[go: up one dir, main page]

0% found this document useful (0 votes)
13 views116 pages

Buffer Overflow Debugging

The document discusses heap usage in programming, noting that malloc() may allocate memory from the heap or via mmap() based on size and allocator strategy. It highlights that the absence of a [heap] region in /proc/<pid>/maps or pmap indicates the program is likely using mmap() for allocations, which is common in modern glibc. Additionally, it suggests using tools like /proc/<pid>/smaps or massif to monitor heap growth over time.

Uploaded by

armen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views116 pages

Buffer Overflow Debugging

The document discusses heap usage in programming, noting that malloc() may allocate memory from the heap or via mmap() based on size and allocator strategy. It highlights that the absence of a [heap] region in /proc/<pid>/maps or pmap indicates the program is likely using mmap() for allocations, which is common in modern glibc. Additionally, it suggests using tools like /proc/<pid>/smaps or massif to monitor heap growth over time.

Uploaded by

armen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 116

ChatGPT

Skip to content

You get a timeline of heap usage and how it evolved.

🧠 Notes
malloc() may allocate from heap or via mmap() , depending on size and

allocator strategy.

Heap ≠ total memory — total memory may grow via shared libraries, stacks, or
mapped files.

To catch mmap() growth too, use /proc/<pid>/smaps or tools like massif .

Would you like a script that polls and logs heap size over time?

there is no [heap] in the output of /proc/<pid>/maps or


or pmap

If there's no [heap] region in /proc/<pid>/maps or pmap , that likely means the


program is not using the traditional heap via brk() , and instead:

✅ It's using mmap() for heap-like allocations, which is normal


on modern glibc.

Ask anything

Tools

ChatGPT can make mistakes. Check important info.


Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content
Skip to content

You might also like