Page MenuHomeFreeBSD

Replace the last use of sbrk() in the tree with mmap().
ClosedPublic

Authored by brooks on Jan 21 2016, 1:15 AM.
Tags
None
Referenced Files
F106406547: D5005.diff
Mon, Dec 30, 5:13 AM
Unknown Object (File)
Sat, Dec 21, 2:58 AM
Unknown Object (File)
Nov 24 2024, 4:52 PM
Unknown Object (File)
Oct 27 2024, 9:38 AM
Unknown Object (File)
Oct 27 2024, 4:45 AM
Unknown Object (File)
Oct 21 2024, 10:10 PM
Unknown Object (File)
Oct 18 2024, 3:33 PM
Unknown Object (File)
Oct 1 2024, 9:03 PM
Subscribers

Details

Summary

All gmon want's is a region of memory without the overhead of malloc().
Just mapping a page with mmap is an easy way to accomplish this.

Obtained from: CheriBSD (bf33e1e70b368ababde74aa3ac70d108c8a52c69)
Sponsored by: DARPA, AFRL

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 2211
Build 2220: arc lint + arc unit

Event Timeline

brooks retitled this revision from to Replace the last use of sbrk() in the tree with mmap()..
brooks updated this object.
brooks edited the test plan for this revision. (Show Details)
brooks added a reviewer: jilles.
jhb added a reviewer: jhb.
jhb added a subscriber: jhb.

Egads, what madness lurks in the depths of libc.

This revision is now accepted and ready to land.Jan 21 2016, 1:22 AM
cem added a reviewer: cem.
cem added a subscriber: cem.
cem added inline comments.
lib/libc/gmon/gmon.c
111

What was minbrk used for?

lib/libc/gmon/gmon.c
111

It sets a floor on the break value. AFACT it's a hack that prevents the program from accidentally freeing the gmon memory. See lib/libc/*/sys/brk.S.

emaste added a reviewer: emaste.
This revision was automatically updated to reflect the committed changes.