Searched refs:PyMem_Malloc (Results 1 – 25 of 52) sorted by relevance
123
97 .. c:function:: void* PyMem_Malloc(size_t n)101 a distinct non-*NULL* pointer if possible, as if ``PyMem_Malloc(1)`` had109 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, or130 Same as :c:func:`PyMem_Malloc`, but allocates ``(n * sizeof(TYPE))`` bytes of167 char *buf = (char *) PyMem_Malloc(BUFSIZ); /* for I/O */173 PyMem_Free(buf); /* allocated with PyMem_Malloc */197 char *buf3 = (char *) PyMem_Malloc(BUFSIZ);
52 PyAPI_FUNC(void *) PyMem_Malloc(size_t);94 ( (type *) PyMem_Malloc((n) * sizeof(type)) ) )
49 #define PyObject_Malloc PyMem_Malloc
78 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()
162 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()
314 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()
114 message = PyMem_Malloc(length+4); in conn_send_string()165 *newbuffer = buffer = PyMem_Malloc((size_t)ulength); in conn_recv_string()
70 *newbuffer = PyMem_Malloc(full_length); in conn_recv_string()
76 p_tstate = PyMem_Malloc(sizeof(PyThreadState *)); in autoGIL_installAutoGIL()
836 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()
331 codestr = (unsigned char *)PyMem_Malloc(codelen); in PyCode_Optimize()
255 key = (unsigned long *)PyMem_Malloc(keymax * sizeof(*key)); in random_seed()475 bytearray = (unsigned char *)PyMem_Malloc(bytes); in random_getrandbits()
1152 p = PyMem_Malloc(1); in call_readline()1180 p = PyMem_Malloc(n+2); in call_readline()
570 buf = (char *)PyMem_Malloc(bufsz); in calculate_path()
1200 odata = (unsigned char *) PyMem_Malloc(datalen); in binascii_a2b_qp()1391 odata = (unsigned char *) PyMem_Malloc(odatalen); in binascii_b2a_qp()
568 self->field = PyMem_Malloc(self->field_size); in parse_grow_buff()1098 self->rec = PyMem_Malloc(self->rec_size); in join_check_rec_size()
798 char *result_buf = (char *)PyMem_Malloc(slicelen); in mmap_subscript()1409 m_obj->tagname = PyMem_Malloc(strlen(tagname)+1); in new_mmap_object()
367 buf = PyMem_Malloc(n1); in PyLocale_strxfrm()
1220 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()
1018 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()
259 PyMem_Malloc
772 self->buf = (char *)PyMem_Malloc(0); in bytesio_new()
544 self->buf = (Py_UNICODE *)PyMem_Malloc(0); in stringio_new()
529 char *result_buf = (char *)PyMem_Malloc(slicelength); in buffer_subscript()
186 indices = (Py_ssize_t *)PyMem_Malloc(sizeof(Py_ssize_t)*view->ndim); in _indirect_copy_nd()