Home
last modified time | relevance | path

Searched refs:PyMem_Malloc (Results 1 – 25 of 121) sorted by relevance

12345

/external/python/cpython3/Include/
Dpymem.h101 PyAPI_FUNC(void *) PyMem_Malloc(size_t size);
127 #define PyMem_MALLOC(n) PyMem_Malloc(n)
143 ( (type *) PyMem_Malloc((n) * sizeof(type)) ) )
/external/python/cpython2/Include/
Dpymem.h52 PyAPI_FUNC(void *) PyMem_Malloc(size_t);
94 ( (type *) PyMem_Malloc((n) * sizeof(type)) ) )
/external/python/cpython2/Doc/c-api/
Dmemory.rst97 .. c:function:: void* PyMem_Malloc(size_t n)
101 a distinct non-*NULL* pointer if possible, as if ``PyMem_Malloc(1)`` had
109 call is equivalent to ``PyMem_Malloc(n)``; else if *n* is equal to zero,
112 to :c:func:`PyMem_Malloc` or :c:func:`PyMem_Realloc`. If the request fails,
120 previous call to :c:func:`PyMem_Malloc` or :c:func:`PyMem_Realloc`. Otherwise, or
130 Same as :c:func:`PyMem_Malloc`, but allocates ``(n * sizeof(TYPE))`` bytes of
249 char *buf = (char *) PyMem_Malloc(BUFSIZ); /* for I/O */
255 PyMem_Free(buf); /* allocated with PyMem_Malloc */
279 char *buf3 = (char *) PyMem_Malloc(BUFSIZ);
/external/python/cpython3/Doc/c-api/
Dmemory.rst181 .. c:function:: void* PyMem_Malloc(size_t n)
187 if ``PyMem_Malloc(1)`` had been called instead. The memory will not have
209 If *p* is *NULL*, the call is equivalent to ``PyMem_Malloc(n)``; else if *n*
214 :c:func:`PyMem_Malloc`, :c:func:`PyMem_Realloc` or :c:func:`PyMem_Calloc`.
223 previous call to :c:func:`PyMem_Malloc`, :c:func:`PyMem_Realloc` or
235 Same as :c:func:`PyMem_Malloc`, but allocates ``(n * sizeof(TYPE))`` bytes of
340 Configuration Name PyMem_RawMalloc PyMem_Malloc P…
404 * :c:func:`PyMem_Malloc`,
449 allocated by :c:func:`PyMem_Malloc`
455 :c:func:`PyMem_Malloc`) domains are called
[all …]
/external/python/cpython3/Python/
Dpyarena.c80 block *b = (block *)PyMem_Malloc(sizeof(block) + size); in block_new()
130 PyArena* arena = (PyArena *)PyMem_Malloc(sizeof(PyArena)); in PyArena_New()
Dpystrtod.c400 dup = PyMem_Malloc(orig_len + 1); in _Py_string_to_number_with_underscores()
896 buf = PyMem_Malloc(bufsize); in PyOS_double_to_string()
1038 buf = (char *)PyMem_Malloc(bufsize); in format_float_short()
1165 buf = (char *)PyMem_Malloc(bufsize); in format_float_short()
Dpystrhex.c18 retbuf = (Py_UCS1*) PyMem_Malloc(arglen*2); in _Py_strhex_impl()
/external/python/cpython2/Modules/_ctypes/
Dstgdict.c78 dst->format = PyMem_Malloc(strlen(src->format) + 1); in PyCStgDict_clone()
86 dst->shape = PyMem_Malloc(sizeof(Py_ssize_t) * src->ndim); in PyCStgDict_clone()
98 dst->ffi_type_pointer.elements = PyMem_Malloc(size); in PyCStgDict_clone()
523 buf = PyMem_Malloc(len + 2 + 1); in PyCStructUnionType_update_stgdict()
Dcallproc.c162 void *space = PyMem_Malloc(sizeof(int) * 2); in CTYPES_CAPSULE_INSTANTIATE_DESTRUCTOR()
696 pa->value.p = PyMem_Malloc(size); in ConvParam()
1704 encoding = PyMem_Malloc(strlen(coding) + 1); in set_conversion_mode()
1712 errors = PyMem_Malloc(strlen(mode) + 1); in set_conversion_mode()
1775 void *ptr = PyMem_Malloc(size); in resize()
1830 buf = PyMem_Malloc(strlen(PyString_AS_STRING(cls)) + 3 + 1); in POINTER()
1847 buf = PyMem_Malloc(strlen(typ->tp_name) + 3 + 1); in POINTER()
/external/python/cpython3/Modules/_ctypes/
Dstgdict.c93 dst->format = PyMem_Malloc(strlen(src->format) + 1); in PyCStgDict_clone()
101 dst->shape = PyMem_Malloc(sizeof(Py_ssize_t) * src->ndim); in PyCStgDict_clone()
113 dst->ffi_type_pointer.elements = PyMem_Malloc(size); in PyCStgDict_clone()
533 buf = PyMem_Malloc(len + 2 + 1); in PyCStructUnionType_update_stgdict()
/external/python/cpython2/Misc/
Dpymemcompat.h49 #define PyObject_Malloc PyMem_Malloc
/external/python/cpython2/Modules/_multiprocessing/
Dsocket_connection.c114 message = PyMem_Malloc(length+4); in conn_send_string()
165 *newbuffer = buffer = PyMem_Malloc((size_t)ulength); in conn_recv_string()
Dpipe_connection.c70 *newbuffer = PyMem_Malloc(full_length); in conn_recv_string()
/external/python/cpython3/Modules/
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(base->ndim * (sizeof *strides)); in copy_structure()
[all …]
D_lsprof.c229 self = (ProfilerEntry*) PyMem_Malloc(sizeof(ProfilerEntry)); in newProfilerEntry()
270 self = (ProfilerSubEntry*) PyMem_Malloc(sizeof(ProfilerSubEntry)); in newSubEntry()
399 PyMem_Malloc(sizeof(ProfilerContext)); in ptrace_enter_call()
D_randommodule.c285 key = (uint32_t *)PyMem_Malloc((size_t)4 * keyused); in random_seed()
408 wordarray = (uint32_t *)PyMem_Malloc(words * 4); in random_getrandbits()
D_lzmamodule.c215 options = (lzma_options_lzma *)PyMem_Malloc(sizeof *options); in INT_TYPE_CONVERTER_FUNC()
260 options = (lzma_options_delta *)PyMem_Malloc(sizeof *options); in parse_filter_spec_delta()
284 options = (lzma_options_bcj *)PyMem_Malloc(sizeof *options); in parse_filter_spec_bcj()
1022 d->input_buffer = PyMem_Malloc(lzs->avail_in); in decompress()
/external/python/cpython3/Modules/_io/
Dwinconsoleio.c549 wchar_t *buf = (wchar_t*)PyMem_Malloc(maxlen * sizeof(wchar_t)); in read_console_w()
631 buf = (wchar_t *)PyMem_Malloc(sizeof(wchar_t)); in read_console_w()
798 buf = (wchar_t*)PyMem_Malloc((bufsize + 1) * sizeof(wchar_t)); in _io__WindowsConsoleIO_readall_impl()
998 wbuf = (wchar_t*)PyMem_Malloc(wlen * sizeof(wchar_t)); in _io__WindowsConsoleIO_write_impl()
/external/python/cpython3/PC/
D_testconsole.c58 rec = (INPUT_RECORD*)PyMem_Malloc(sizeof(INPUT_RECORD) * size); in _testconsole_write_input_impl()
/external/python/cpython2/Mac/Modules/
DautoGIL.c76 p_tstate = PyMem_Malloc(sizeof(PyThreadState *)); in autoGIL_installAutoGIL()
/external/python/cpython2/Python/
Dpystrtod.c836 buf = PyMem_Malloc(bufsize); in PyOS_double_to_string()
977 buf = (char *)PyMem_Malloc(bufsize); in format_float_short()
1106 buf = (char *)PyMem_Malloc(bufsize); in format_float_short()
/external/python/cpython2/Modules/
D_randommodule.c261 key = (unsigned long *)PyMem_Malloc(keymax * sizeof(*key)); in random_seed()
484 bytearray = (unsigned char *)PyMem_Malloc(bytes); in random_getrandbits()
/external/python/cpython2/PC/
D_winreg.c1219 retValueBuf = (char *)PyMem_Malloc(retValueSize); in PyEnumValue()
1222 retDataBuf = (char *)PyMem_Malloc(retDataSize); in PyEnumValue()
1290 retValue = (Py_UNICODE *)PyMem_Malloc(retValueSize * sizeof(Py_UNICODE)); in PyExpandEnvironmentStrings()
1428 retBuf = (char *) PyMem_Malloc(bufSize); in PyQueryValue()
1489 retBuf = (char *)PyMem_Malloc(bufSize); in PyQueryValueEx()
/external/python/cpython3/Objects/
Dmemoryobject.c392 mem = PyMem_Malloc(dest->shape[0] * dest->itemsize); in copy_single()
424 mem = PyMem_Malloc(dest->shape[dest->ndim-1] * dest->itemsize); in copy_buffer()
482 strides = PyMem_Malloc(src->ndim * (sizeof *src->strides)); in buffer_to_contiguous()
808 char *cp = PyMem_Malloc(strlen(fmt)+1); in mbuf_copy_format()
992 fb = PyMem_Malloc(sizeof *fb + 3 * src->ndim * (sizeof *fb->array)); in PyBuffer_ToContiguous()
1891 struct unpacker *x = PyMem_Malloc(sizeof *x); in unpacker_new()
1952 x->item = PyMem_Malloc(itemsize); in struct_get_unpacker()
2857 mem = PyMem_Malloc(view->len); in memory_hash()
Dcall.c853 args2 = PyMem_Malloc(nargs * sizeof(PyObject *)); in _PyObject_FastCall_Prepend()
891 stack = PyMem_Malloc((argcount + 1) * sizeof(PyObject *)); in _PyObject_Call_Prepend()
1186 stack = PyMem_Malloc(nargs * sizeof(stack[0])); in object_vacall()
1370 stack = PyMem_Malloc((nargs + nkwargs) * sizeof(stack[0])); in _PyStack_UnpackDict()

12345