MCPcopy Create free account
hub / github.com/Singular/Singular / omReallocLarge

Function omReallocLarge

omalloc/omAllocSystem.c:57–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57void* omReallocLarge(void* old_addr, size_t new_size)
58{
59 char* _old_addr;
60 char* new_addr;
61
62 omAssume(omIsLargeAddr(old_addr));
63
64 new_size = OM_ALIGN_SIZE(new_size);
65 _old_addr = (char *)old_addr - SIZEOF_STRICT_ALIGNMENT;
66 new_addr = omReallocSizeFromSystem(_old_addr,
67 *((size_t*) _old_addr) + SIZEOF_STRICT_ALIGNMENT,
68 new_size + SIZEOF_STRICT_ALIGNMENT);
69 *((size_t*) new_addr) = new_size;
70 return (void *)(new_addr + SIZEOF_STRICT_ALIGNMENT);
71}
72
73void omFreeLarge(void* addr)
74{

Callers 2

omRealloc0LargeFunction · 0.85
omDoReallocFunction · 0.85

Calls 1

omReallocSizeFromSystemFunction · 0.85

Tested by

no test coverage detected