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)
Wed, May 8, 1:38 AM
Unknown Object (File)
Wed, May 8, 12:45 AM
Unknown Object (File)
Feb 28 2024, 10:49 AM
Unknown Object (File)
Feb 28 2024, 9:03 AM
Unknown Object (File)
Dec 25 2023, 7:59 PM
Unknown Object (File)
Dec 19 2023, 4:18 PM
Unknown Object (File)
Nov 6 2023, 7:24 PM
Unknown Object (File)
Oct 24 2023, 9:44 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.