Page MenuHomeFreeBSD

shells/44bsd-csh: remove sbrk use
AbandonedPublic

Authored by brooks on Dec 8 2023, 11:22 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Sep 24, 1:59 AM
Unknown Object (File)
Tue, Sep 9, 1:24 PM
Unknown Object (File)
Tue, Sep 9, 4:16 AM
Unknown Object (File)
Thu, Sep 4, 4:51 PM
Unknown Object (File)
Tue, Sep 2, 2:05 PM
Unknown Object (File)
Aug 22 2025, 1:53 PM
Unknown Object (File)
Aug 22 2025, 9:45 AM
Unknown Object (File)
Aug 21 2025, 6:51 AM
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...