🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.atari.st
Article #32157

Re: Mshrink() (was "BITNET mail follows")

#32157
From: Daniel A. Glasser
Date: Tue, 26 Apr 1988 16:16
25 lines
2053 bytes
I believe that some of the confusion here stems from the Abucus Internals
book (first edition, I don't have the second edition) which not only has a
description which is incomprehensable, but uses a different name than most
other docs.  The name they give it is SETBLOCK...  The function should not
be compiler specific if the compiler package offers bios/xbios/gemdos calls.
The Mark Williams C package does it with macros in the file osbind.h, the
Lattice C package uses functions in the library (since they use a 32 bit
'int' and TOS uses 16 bit ints...)

Mshrink() takes two parameters, the first is a pointer to the beginning of
a block of memory that has been allocated by a call to Malloc() (this includes
the basepage/TPA of a program in memory) and the second parameter is a long
containing the number of bytes to be freed.  Mshrink() is a GEMDOS function
and has function code 74.

*WARNING***WARNING***WARNING***WARNING***WARNING***WARNING***WARNING***WARNING*
* DO NOT CALL MSHRINK WITH THE FIRST PARAMETER POINTING TO ANYTHING EXCEPT    *
* THE BEGINNING OF A BLOCK ALLOCATED WITH THE *GEMDOS* Malloc FUNCTION OR THE *
* BASEPAGE OF A PROCESS IN MEMORY!  (Pexec() does an Malloc())  THE SYSTEM    *
* WILL VERY LIKELY GO BERZERK!                                                *
*WARNING***WARNING***WARNING***WARNING***WARNING***WARNING***WARNING***WARNING*
-- 
		Daniel A. Glasser	dag@chinet.UUCP
    One of those things that goes "BUMP!!! (ouch!)" in the night.
 ...!att-ih!chinet!dag | ...!ihnp4!mwc!dag | ...!ihnp4!mwc!gorgon!dag
Technical Details
Message-ID: <4983@chinet.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!bloom-beacon!mit-eddie!ll-xn!ames!amdahl!pacbell!att-ih!chinet!dag
References: <8804232325.AA03151@ucbvax.Berkeley.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!bloom-beacon!mit-eddie!ll-xn!ames!amdahl!pacbell!att-ih!chinet!dag
From: dag@chinet.UUCP (Daniel A. Glasser)
Newsgroups: comp.sys.atari.st
Subject: Re: Mshrink() (was "BITNET mail follows")
Message-ID: <4983@chinet.UUCP>
Date: 26 Apr 88 16:16:02 GMT
References: <8804232325.AA03151@ucbvax.Berkeley.EDU>
Reply-To: dag@chinet.UUCP (Daniel A. Glasser)
Organization: Chinet - Public Access Unix
Lines: 25
Summary: Mshrink is a TOS function