MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / valloc

Function valloc

vm/ByteCodeTranslator/src/malloc.c:221–231  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219}
220
221void*
222valloc(size_t size) {
223 initializer();
224 if (!size)
225 size = page_size;
226 size_t total_size = size + page_size;
227 void* buffer = rpmalloc(total_size);
228 if ((uintptr_t)buffer & (page_size - 1))
229 return (void*)(((uintptr_t)buffer & ~(page_size - 1)) + page_size);
230 return buffer;
231}
232
233void*
234pvalloc(size_t size) {

Callers 1

pvallocFunction · 0.85

Calls 2

initializerFunction · 0.85
rpmallocFunction · 0.85

Tested by

no test coverage detected