Home
last modified time | relevance | path

Searched refs:PyMem_Malloc (Results 1 - 25 of 81) sorted by relevance

1234

/third_party/python/Include/
H A Dpymem.h24 different heaps, and if you use PyMem_Malloc you'll get the memory from the
52 PyAPI_FUNC(void *) PyMem_Malloc(size_t size);
69 ( (type *) PyMem_Malloc((n) * sizeof(type)) ) )
85 #define PyMem_MALLOC(n) PyMem_Malloc(n)
/third_party/python/Python/
H A Dpyarena.c81 block *b = (block *)PyMem_Malloc(sizeof(block) + size); in block_new()
131 PyArena* arena = (PyArena *)PyMem_Malloc(sizeof(PyArena)); in _PyArena_New()
H A Dpystrtod.c257 copy = (char *)PyMem_Malloc(end - digits_pos + in _PyOS_ascii_strtod()
398 dup = PyMem_Malloc(orig_len + 1); in _Py_string_to_number_with_underscores()
894 buf = PyMem_Malloc(bufsize); in PyOS_double_to_string()
978 /* Convert a double d to a string, and return a PyMem_Malloc'd block of
1002 Returns a PyMem_Malloc'd block of memory containing the resulting string,
1053 buf = (char *)PyMem_Malloc(bufsize); in format_float_short()
1180 buf = (char *)PyMem_Malloc(bufsize); in format_float_short()
H A Dhashtable.c324 alloc.malloc = PyMem_Malloc; in _Py_hashtable_new_full()
/third_party/python/Modules/_ctypes/
H A Dstgdict.c103 dst->format = PyMem_Malloc(strlen(src->format) + 1); in PyCStgDict_clone()
111 dst->shape = PyMem_Malloc(sizeof(Py_ssize_t) * src->ndim); in PyCStgDict_clone()
123 dst->ffi_type_pointer.elements = PyMem_Malloc(size); in PyCStgDict_clone()
588 buf = PyMem_Malloc(len + 2 + 1); in PyCStructUnionType_update_stgdict()
792 type_block = PyMem_Malloc(alloc_size); in PyCStructUnionType_update_stgdict()
/third_party/python/Modules/
H A D_testbuffer.c126 ndbuf = PyMem_Malloc(sizeof *ndbuf); in ndbuf_new()
137 ndbuf->data = PyMem_Malloc(len); in ndbuf_new()
553 mem = PyMem_Malloc(dest->shape[dest->ndim-1] * dest->itemsize); in copy_buffer()
708 item = PyMem_Malloc(base->itemsize); in ndarray_as_list()
809 fmt = PyMem_Malloc(PyBytes_GET_SIZE(tmp)+1); in get_format()
892 s = PyMem_Malloc(base->ndim * (sizeof *s)); in strides_from_shape()
1048 data = PyMem_Malloc(ndbuf->len + addsize); in init_suboffsets()
1083 base->suboffsets = PyMem_Malloc(base->ndim * (sizeof *base->suboffsets)); in init_suboffsets()
1746 shape = PyMem_Malloc(base->ndim * (sizeof *shape)); in copy_structure()
1747 strides = PyMem_Malloc(bas in copy_structure()
[all...]
H A D_lsprof.c200 self = (ProfilerEntry*) PyMem_Malloc(sizeof(ProfilerEntry)); in newProfilerEntry()
241 self = (ProfilerSubEntry*) PyMem_Malloc(sizeof(ProfilerSubEntry)); in newSubEntry()
370 PyMem_Malloc(sizeof(ProfilerContext)); in ptrace_enter_call()
H A D_zoneinfo.c913 PyMem_Malloc(self->num_transitions * sizeof(int64_t)); in load_data()
917 trans_idx = PyMem_Malloc(self->num_transitions * sizeof(Py_ssize_t)); in load_data()
954 utcoff = PyMem_Malloc(self->num_ttinfos * sizeof(long)); in load_data()
955 isdst = PyMem_Malloc(self->num_ttinfos * sizeof(unsigned char)); in load_data()
1001 self->_ttinfos = PyMem_Malloc(self->num_ttinfos * sizeof(_ttinfo)); in load_data()
2071 trans_local[i] = PyMem_Malloc(num_transitions * sizeof(int64_t)); in ts_to_local()
2271 StrongCacheNode *node = PyMem_Malloc(sizeof(StrongCacheNode)); in strong_cache_node_new()
H A D_randommodule.c324 key = (uint32_t *)PyMem_Malloc((size_t)4 * keyused); in random_seed()
502 wordarray = (uint32_t *)PyMem_Malloc(words * 4); in _random_Random_getrandbits_impl()
H A Dgetpath.c267 wchar_t **parts = (wchar_t **)PyMem_Malloc(n * sizeof(wchar_t *));
294 wchar_t *final = cchFinal > 0 ? (wchar_t *)PyMem_Malloc(cchFinal * sizeof(wchar_t)) : NULL;
362 char *buffer = (char *)PyMem_Malloc(MAX_FILE);
H A D_scproxy.c33 buf = PyMem_Malloc(len*4); in cfstring_to_pystring()
H A Datexitmodule.c165 atexit_callback *callback = PyMem_Malloc(sizeof(atexit_callback)); in atexit_register()
H A D_tkinter.c412 q = buf = (char *)PyMem_Malloc(size); in unicodeFromTclStringAndSize()
627 argv0 = (char*)PyMem_Malloc(strlen(className) + 1); in Tkapp_New()
661 args = (char*)PyMem_Malloc(len); in Tkapp_New()
989 argv = (Tcl_Obj **) PyMem_Malloc(((size_t)size) * sizeof(Tcl_Obj *)); in AsObj()
1108 bytes = PyMem_Malloc(numBytes); in fromBignumObj()
1289 objv = (Tcl_Obj **)PyMem_Malloc(((size_t)objc) * sizeof(Tcl_Obj *)); in Tkapp_CallArgs()
/third_party/python/Parser/
H A Dpegen.c98 arr->items = PyMem_Malloc(initial_size * sizeof(*arr->items)); in growable_comment_array_init()
218 char *tag = PyMem_Malloc(len + 1); in _PyPegen_fill_token()
615 dup = PyMem_Malloc(strlen(s) + 1); in parsenumber()
753 Parser *p = PyMem_Malloc(sizeof(Parser)); in _PyPegen_Parser_New()
764 p->tokens = PyMem_Malloc(sizeof(Token *)); in _PyPegen_Parser_New()
H A Dtokenizer.c54 struct tok_state *tok = (struct tok_state *)PyMem_Malloc( in tok_new()
98 char* result = (char *)PyMem_Malloc(len + 1); in new_string()
628 buf = PyMem_Malloc(needed_length); in translate_newlines()
787 if ((tok->buf = (char *)PyMem_Malloc(BUFSIZ)) == NULL) { in _PyTokenizer_FromFile()
906 newtok = PyMem_Malloc(buflen+1); in tok_underflow_interactive()
2184 The char* returned is malloc'ed via PyMem_Malloc() and thus must be freed
2225 encoding = (char *)PyMem_Malloc(strlen(tok->encoding) + 1); in _PyTokenizer_FindEncodingFilename()
H A Dparser.c23552 void **_children = PyMem_Malloc(sizeof(void *)); in _loop0_1_rule()
23620 void **_children = PyMem_Malloc(sizeof(void *)); in _loop0_2_rule()
23688 void **_children = PyMem_Malloc(sizeof(void *)); in _loop1_3_rule()
23761 void **_children = PyMem_Malloc(sizeof(void *)); in _loop0_5_rule()
24352 void **_children = PyMem_Malloc(sizeof(void *)); in _loop1_14_rule()
24588 void **_children = PyMem_Malloc(sizeof(void *)); in _loop0_19_rule()
24707 void **_children = PyMem_Malloc(sizeof(void *)); in _loop0_21_rule()
24931 void **_children = PyMem_Malloc(sizeof(void *)); in _loop0_24_rule()
24999 void **_children = PyMem_Malloc(sizeof(void *)); in _loop1_25_rule()
25072 void **_children = PyMem_Malloc(sizeo in _loop0_27_rule()
[all...]
H A Dmyreadline.c347 Note: Python expects in return a buffer allocated with PyMem_Malloc. */
404 res = PyMem_Malloc(len); in PyOS_Readline()
/third_party/python/Modules/_io/
H A Dwinconsoleio.c531 wchar_t *buf = (wchar_t*)PyMem_Malloc(maxlen * sizeof(wchar_t)); in read_console_w()
613 buf = (wchar_t *)PyMem_Malloc(sizeof(wchar_t)); in read_console_w()
789 buf = (wchar_t*)PyMem_Malloc((bufsize + 1) * sizeof(wchar_t)); in _io__WindowsConsoleIO_readall_impl()
1009 wbuf = (wchar_t*)PyMem_Malloc(wlen * sizeof(wchar_t)); in _io__WindowsConsoleIO_write_impl()
/third_party/python/Objects/
H A Dcapsule.c201 char *name_dup = (char *)PyMem_Malloc(name_length); in PyCapsule_Import()
H A Dmemoryobject.c400 mem = PyMem_Malloc(dest->shape[0] * dest->itemsize); in copy_single()
432 mem = PyMem_Malloc(dest->shape[dest->ndim-1] * dest->itemsize); in copy_buffer()
490 strides = PyMem_Malloc(src->ndim * (sizeof *src->strides)); in buffer_to_contiguous()
816 char *cp = PyMem_Malloc(strlen(fmt)+1); in mbuf_copy_format()
1002 fb = PyMem_Malloc(sizeof *fb + 3 * src->ndim * (sizeof *fb->array)); in PyBuffer_ToContiguous()
1940 struct unpacker *x = PyMem_Malloc(sizeof *x); in unpacker_new()
2001 x->item = PyMem_Malloc(itemsize); in struct_get_unpacker()
2972 mem = PyMem_Malloc(view->len); in memory_hash()
H A Dcall.c469 stack = PyMem_Malloc((argcount + 1) * sizeof(PyObject *)); in _PyObject_Call_Prepend()
802 stack = PyMem_Malloc(nargs * sizeof(stack[0])); in object_vacall()
968 /* Check for overflow in the PyMem_Malloc() call below. The subtraction in _PyStack_UnpackDict()
978 PyObject **stack = PyMem_Malloc((1 + nargs + nkwargs) * sizeof(args[0])); in _PyStack_UnpackDict()
H A Dmoduleobject.c234 m->md_state = PyMem_Malloc(module->m_size); in _PyModule_CreateInitialized()
400 md->md_state = PyMem_Malloc(def->m_size); in PyModule_ExecDef()
H A Dlistobject.c695 recycle = (PyObject **)PyMem_Malloc(s); in list_ass_slice()
1609 ms->a.keys = (PyObject **)PyMem_Malloc(multiplier * need in merge_getmem()
2309 keys = PyMem_Malloc(sizeof(PyObject *) * saved_ob_size); in list_sort_impl()
2976 PyMem_Malloc(slicelength*sizeof(PyObject*)); in list_ass_subscript()
3058 PyMem_Malloc(slicelength*sizeof(PyObject*)); in list_ass_subscript()
/third_party/python/Modules/_multiprocessing/
H A Dsemaphore.c496 name_copy = PyMem_Malloc(strlen(name) + 1); in _multiprocessing_SemLock_impl()
549 name_copy = PyMem_Malloc(strlen(name) + 1); in _multiprocessing_SemLock__rebuild_impl()
/third_party/python/PC/
H A Dwinreg.c1193 retDataBuf = (BYTE *)PyMem_Malloc(retDataSize); in winreg_EnumValue_impl()
1524 retBuf = (wchar_t *) PyMem_Malloc(bufSize); in winreg_QueryValue_impl()
1593 retBuf = (BYTE *)PyMem_Malloc(bufSize); in winreg_QueryValueEx_impl()

Completed in 75 milliseconds

1234