home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NeXTSTEP 3.2 (Developer)
/
NS_dev_3.2.iso
/
NextDeveloper
/
Headers
/
appkit
/
chunk.h
< prev
next >
Wrap
Text File
|
1991-10-19
|
1KB
|
31 lines
/*
chunk.h
Application Kit, Release 2.0
Copyright (c) 1988, 1989, 1990, NeXT, Inc. All rights reserved.
*/
#import <objc/zone.h>
/*
* NXChunks implement variable sized arrays of records. Allocation is by
* the given size (in bytes) --- typically a multiple number of records, say 10.
* The block of memory never shrinks, and the chunk records the current number
* of elements. To use the NXChunks, you declare a struct w/ NXChunk as its
* first field.
*/
typedef struct _NXChunk {
short growby; /* increment to grow by */
int allocated; /* how much is allocated */
int used; /* how much is used */
} NXChunk;
extern NXChunk *NXChunkMalloc(int growBy, int initUsed);
extern NXChunk *NXChunkRealloc(NXChunk *pc);
extern NXChunk *NXChunkGrow(NXChunk *pc, int newUsed);
extern NXChunk *NXChunkCopy(NXChunk *pc, NXChunk *dpc);
extern NXChunk *NXChunkZoneMalloc(int growBy, int initUsed, NXZone *zone);
extern NXChunk *NXChunkZoneRealloc(NXChunk *pc, NXZone *zone);
extern NXChunk *NXChunkZoneGrow(NXChunk *pc, int newUsed, NXZone *zone);
extern NXChunk *NXChunkZoneCopy(NXChunk *pc, NXChunk *dpc, NXZone *zone);