MCPcopy Create free account
hub / github.com/GregoryFaust/samblaster / blockMalloc

Function blockMalloc

sbhash.cpp:51–56  ·  view source on GitHub ↗

Allocate big blocks of memory.

Source from the content-addressed store, hash-verified

49
50// Allocate big blocks of memory.
51char * blockMalloc(ssize_t size)
52{
53 char * retval = (char *)mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, 0, 0);
54 checkFSerrWithFilename((ssize_t)retval);
55 return retval;
56}
57
58// Free big blocks of memory. Not the size is needed.
59void blockFree(char * ptr, ssize_t size)

Callers 1

pushNewLBMallocBlockFunction · 0.85

Calls 1

checkFSerrWithFilenameFunction · 0.85

Tested by

no test coverage detected