Topic : TOS - The Operating System Author : Version : tos.hyp (December 19, 2008) Subject : Programmieren/Atari Nodes : 3010 Index Size : 93790 HCP-Version : 5 Compiled on : Atari @charset : atarist @lang : @default : Title @help : @options : +g -i -s +x +zz -t4 @width : 70 View Ref-File5.13.4 Mshrink TOS Name: »memory shrink« - Reduce or enlarge a memory block. Opcode: 74 Syntax: int32_t Mshrink ( void *block, int32_t newsiz ); Description: The GEMDOS routine Mshrink reduces or enlarges an already reserved memory block in the GEMDOS free list. The following apply: Parameter Meaning block Start address of the memory block newsiz New (changed) length of the block; in MagiC additionally: -1 = Obtain the largest possible size of the memory block 0 = Release block Note: As a rule no check is made whether the memory block really belongs to the caller. The option to enlarge a memory block is only available in MagiC at present. However this only works if a large enough free block is present above the block in question, and the TOS-compatibility has been deactivated. Return value: The function can return the following results: E_OK : No error has arisen EIMBA : Invalid memory block address EGSBF : Block was enlarged Availability: All GEMDOS versions. Group: Memory management See also: Binding Malloc Mfree