Page MenuHomeFreeBSD

shells/44bsd-csh: remove sbrk use
AbandonedPublic

Authored by brooks on Dec 8 2023, 11:22 PM.
Tags
None
Referenced Files
F142127490: D42981.diff
Fri, Jan 16, 7:06 AM
Unknown Object (File)
Fri, Dec 19, 8:35 AM
Unknown Object (File)
Nov 29 2025, 9:43 PM
Unknown Object (File)
Nov 18 2025, 10:31 PM
Unknown Object (File)
Nov 9 2025, 10:56 PM
Unknown Object (File)
Oct 29 2025, 12:57 PM
Unknown Object (File)
Oct 21 2025, 4:06 AM
Unknown Object (File)
Oct 18 2025, 10:37 PM
Subscribers

Details

Reviewers
cy
Summary

The allocator wrappers call sbrk(0) to track heap usage. With modern
malloc implementations this is of little value and sbrk is deprecated so
remove this functionality, but continue to provide a stub implemenation
of the alloc command.

Diff Detail

Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 54876
Build 51765: arc lint + arc unit

Event Timeline

brooks created this revision.

Compiled and minimally smoke tested on an amd64 world without sbrk support.

why is this port still a thing

I'm going to take a different path for ancient tools.

I simply removed the Malloc, Realloc, and Free functions with direct calls to the authoritative libc versions, malloc, etc...