Search completed in 0.97 seconds.
4 results for "js_realloc":
JS_malloc
MozillaProjectsSpiderMonkeyJSAPI referenceJS malloc
syntax void * js_malloc(jscontext *cx, size_t nbytes); void * js_realloc(jscontext *cx, void *p, size_t oldbytes, size_t newbytes); char * js_strdup(jscontext *cx, const char *s); void js_free(jscontext *cx, void *p); name type description cx jscontext * pointer to a js context.
... p void * (js_realloc and js_free only) pointer to a previously allocated region of memory to resize or deallocate.
... nbytes size_t (js_malloc and js_realloc only) amount of space, in bytes, to allocate.
...And 8 more matches
Choosing the right memory allocator
MozillaChoosing the right memory allocator
js_malloc() js_realloc() js_free() js_strdup() arena allocators nspr exposes arena allocators that can be used to efficiently allocate lots of small, uniformly sized objects.
JS::SourceBufferHolder
MozillaProjectsSpiderMonkeyJSAPI referenceJS::SourceBufferHolder
rules for use: the data array must be allocated with js_malloc or js_realloc if ownership is being granted to the sourcebufferholder.
JSAPI reference
MozillaProjectsSpiderMonkeyJSAPI reference
these functions also allow spidermonkey to account the number of bytes allocated: js_malloc js_free js_realloc js_strdup struct jsfreeop added in spidermonkey 17 js_freeop added in spidermonkey 17 js_getdefaultfreeop added in spidermonkey 17 javascript objects, strings, and floating-point numbers are garbage collected.