October 2018
Beginner
794 pages
19h 23m
English
This time, we pass the 2 parameter, asking the program to perform larger allocations (greater than MMAP_THRESHOLD):
$ ./malloc_brk_test 2 init_brk = 0x2209000 #: malloc( n) = heap_ptr cur_brk delta [cur_brk-init_brk][...] 3: malloc( 136168) = 0x7f57288cd010 0x222a000 [135168]Arena 0:system bytes = 135168in use bytes = 5792Total (incl. mmap):system bytes = 274432in use bytes = 145056max mmap regions = 1max mmap bytes = 139264 4: malloc( 1048576) = 0x7f57287c7010 0x222a000 [135168]Arena 0:system bytes = 135168in use bytes = 5792Total (incl. mmap):system bytes = 1327104in use bytes = 1197728max mmap regions = 2max mmap bytes = 1191936$
(Note that the preceding code we have clipped the output of the first ...
Read now
Unlock full access