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
Unknown Object (File)
Sun, Nov 24, 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
Unknown Object (File)
Oct 1 2024, 6:56 PM
Unknown Object (File)
Sep 26 2024, 7:46 AM
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 Not Applicable
Unit
Tests Not Applicable

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 ↗(On Diff #12528)

What was minbrk used for?

lib/libc/gmon/gmon.c
111 ↗(On Diff #12528)

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.