Home
last modified time | relevance | path

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

123

/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
167 char *buf = (char *) PyMem_Malloc(BUFSIZ); /* for I/O */
173 PyMem_Free(buf); /* allocated with PyMem_Malloc */
197 char *buf3 = (char *) PyMem_Malloc(BUFSIZ);
/external/python/cpython2/Include/
Dpymem.h52 PyAPI_FUNC(void *) PyMem_Malloc(size_t);
94 ( (type *) PyMem_Malloc((n) * sizeof(type)) ) )
/external/python/cpython2/Misc/
Dpymemcompat.h49 #define PyObject_Malloc PyMem_Malloc
/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()
515 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()
D_ctypes.c314 result = PyMem_Malloc(len + 1); in _ctypes_alloc_format_string()
344 new_prefix = PyMem_Malloc(prefix_len); in _ctypes_alloc_format_string_with_shape()
1429 stgdict->shape = PyMem_Malloc(sizeof(Py_ssize_t *) * stgdict->ndim); in PyCArrayType_new()
2801 obj->b_ptr = (char *)PyMem_Malloc(dict->size); in PyCData_MallocBuffer()
4460 dest = (char *)PyMem_Malloc(slicelen); in Array_subscript()
5249 dest = (char *)PyMem_Malloc(len); in Pointer_subscript()
/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/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()
Dpeephole.c331 codestr = (unsigned char *)PyMem_Malloc(codelen); in PyCode_Optimize()
/external/python/cpython2/Modules/
D_randommodule.c255 key = (unsigned long *)PyMem_Malloc(keymax * sizeof(*key)); in random_seed()
475 bytearray = (unsigned char *)PyMem_Malloc(bytes); in random_getrandbits()
Dreadline.c1152 p = PyMem_Malloc(1); in call_readline()
1180 p = PyMem_Malloc(n+2); in call_readline()
Dgetpath.c570 buf = (char *)PyMem_Malloc(bufsz); in calculate_path()
Dbinascii.c1200 odata = (unsigned char *) PyMem_Malloc(datalen); in binascii_a2b_qp()
1391 odata = (unsigned char *) PyMem_Malloc(odatalen); in binascii_b2a_qp()
D_csv.c568 self->field = PyMem_Malloc(self->field_size); in parse_grow_buff()
1098 self->rec = PyMem_Malloc(self->rec_size); in join_check_rec_size()
Dmmapmodule.c798 char *result_buf = (char *)PyMem_Malloc(slicelen); in mmap_subscript()
1409 m_obj->tagname = PyMem_Malloc(strlen(tagname)+1); in new_mmap_object()
D_localemodule.c367 buf = PyMem_Malloc(n1); in PyLocale_strxfrm()
/external/python/cpython2/PC/
D_winreg.c1220 retValueBuf = (char *)PyMem_Malloc(retValueSize); in PyEnumValue()
1223 retDataBuf = (char *)PyMem_Malloc(retDataSize); in PyEnumValue()
1291 retValue = (Py_UNICODE *)PyMem_Malloc(retValueSize * sizeof(Py_UNICODE)); in PyExpandEnvironmentStrings()
1429 retBuf = (char *) PyMem_Malloc(bufSize); in PyQueryValue()
1490 retBuf = (char *)PyMem_Malloc(bufSize); in PyQueryValueEx()
/external/python/cpython2/Objects/stringlib/
Dformatter.h1018 unicode_tmp = (Py_UNICODE*)PyMem_Malloc((n_digits)*sizeof(Py_UNICODE)); in format_float_internal()
1196 re_unicode_tmp = (Py_UNICODE*)PyMem_Malloc((n_re_digits)*sizeof(Py_UNICODE)); in format_complex_internal()
1204 im_unicode_tmp = (Py_UNICODE*)PyMem_Malloc((n_im_digits)*sizeof(Py_UNICODE)); in format_complex_internal()
/external/python/cpython2/PC/os2vacpp/
Dpython.def259 PyMem_Malloc
/external/python/cpython2/Modules/_io/
Dbytesio.c772 self->buf = (char *)PyMem_Malloc(0); in bytesio_new()
Dstringio.c544 self->buf = (Py_UNICODE *)PyMem_Malloc(0); in stringio_new()
/external/python/cpython2/Objects/
Dbufferobject.c529 char *result_buf = (char *)PyMem_Malloc(slicelength); in buffer_subscript()
Dmemoryobject.c186 indices = (Py_ssize_t *)PyMem_Malloc(sizeof(Py_ssize_t)*view->ndim); in _indirect_copy_nd()

123