home *** CD-ROM | disk | FTP | other *** search
- /* NSZone.h
- Allocation of large regions
- Copyright 1994, NeXT Computer, Inc.
- */
-
- #import <Foundation/NSObjCRuntime.h>
-
- @class NSString;
-
- typedef struct _NSZone NSZone;
-
- FOUNDATION_EXPORT
- extern NSZone *NSDefaultMallocZone(void);
- FOUNDATION_EXPORT
- extern NSZone *NSCreateZone(unsigned startSize, unsigned granularity, BOOL canFree);
- FOUNDATION_EXPORT
- extern void NSRecycleZone(NSZone *zone);
- FOUNDATION_EXPORT
- extern void NSSetZoneName(NSZone *zone, NSString *name);
- FOUNDATION_EXPORT
- extern NSString *NSZoneName(NSZone *zone);
- FOUNDATION_EXPORT
- extern NSZone *NSZoneFromPointer(void *ptr);
-
- FOUNDATION_EXPORT
- extern void *NSZoneMalloc(NSZone *zone, unsigned size);
- FOUNDATION_EXPORT
- extern void *NSZoneCalloc(NSZone *zone, unsigned numElems, unsigned byteSize);
- FOUNDATION_EXPORT
- extern void *NSZoneRealloc(NSZone *zone, void *ptr, unsigned size);
- FOUNDATION_EXPORT
- extern void NSZoneFree(NSZone *zone, void *ptr);
-
- FOUNDATION_EXPORT
- extern unsigned NSPageSize(void);
- FOUNDATION_EXPORT
- extern unsigned NSLogPageSize(void);
- FOUNDATION_EXPORT
- extern unsigned NSRoundUpToMultipleOfPageSize(unsigned bytes);
- FOUNDATION_EXPORT
- extern unsigned NSRoundDownToMultipleOfPageSize(unsigned bytes);
- FOUNDATION_EXPORT
- extern void *NSAllocateMemoryPages(unsigned bytes);
- FOUNDATION_EXPORT
- extern void NSDeallocateMemoryPages(void *ptr, unsigned bytes);
- FOUNDATION_EXPORT
- extern void NSCopyMemoryPages(const void *source, void *dest, unsigned bytes);
- FOUNDATION_EXPORT
- extern unsigned NSRealMemoryAvailable(void);
-