Article View: net.bugs
Article #84Re: sbrk inertia
From: utzoodecvaxharpoeaglemhuxtmhuxam...
Date: Thu, 24 Mar 1983 12:00
Date: Thu, 24 Mar 1983 12:00
34 lines
1277 bytes
1277 bytes
What you cite as a bug is simply the way it works. sbrk(n) returns
either the address of a block of "n" bytes added to your address space,
or it returns -1. In your example, you got the base of 0 bytes added
to your space (no growth), then the base of 1 byte added to your space
(growth of 1 byte; the result should always be the same number as the
previous sbrk(0)!), then the address of the next 0 byte allocation (no
growth).
Graphically:
---------------------
| | | | | |
---------------------
^ ^
0 sbrk(0)
-------------------------
| | | | | | |
-------------------------
^ ^
0 sbrk(1)
-------------------------
| | | | | | |
-------------------------
^ ^
0 sbrk(0)
Martin Shannon, Jr.
Phone: (201) 582-3199
Internet: mjs@mhb5b.uucp
UUCP: {allegra,rabbit,alice,mhb5b,mhb5c}!mjs
USPS: 600 Mountain Avenue Room 5F-120
Murray Hill, NJ 07974
Technical Details
Message-ID:
<bnews.mhb5b.230>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<180@p500vax.UUCP>Show Full Headers
Complete Article Headers
From: utzoo!decvax!harpo!eagle!mhuxt!mhuxa!mhb5b!mjs Newsgroups: net.bugs Title: Re: sbrk inertia Article-I.D.: mhb5b.230 Posted: Thu Mar 24 12:00:42 1983 Received: Fri Mar 25 21:24:00 1983 References: <180@p500vax.UUCP> Subject: Re: sbrk inertia Date: Thu, 24 Mar 1983 12:00:42 +0000 Message-ID: <bnews.mhb5b.230>