12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546 |
- {
- File: CarbonCore/MacMemory.h
-
- Contains: Memory Manager Interfaces.
- The contents of this header file are deprecated.
- Use malloc, free, etc instead.
-
- Copyright: © 1985-2011 by Apple Inc. All rights reserved.
- }
- {
- Modified for use with Free Pascal
- Version 308
- Please report any bugs to <[email protected]>
- }
- {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
- {$mode macpas}
- {$modeswitch cblocks}
- {$packenum 1}
- {$macro on}
- {$inline on}
- {$calling mwpascal}
- unit MacMemory;
- interface
- {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
- {$setc GAP_INTERFACES_VERSION := $0308}
- {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
- {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
- {$endc}
- {$ifc defined CPUPOWERPC and defined CPUI386}
- {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
- {$endc}
- {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
- {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
- {$endc}
- {$ifc not defined __ppc__ and defined CPUPOWERPC32}
- {$setc __ppc__ := 1}
- {$elsec}
- {$setc __ppc__ := 0}
- {$endc}
- {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
- {$setc __ppc64__ := 1}
- {$elsec}
- {$setc __ppc64__ := 0}
- {$endc}
- {$ifc not defined __i386__ and defined CPUI386}
- {$setc __i386__ := 1}
- {$elsec}
- {$setc __i386__ := 0}
- {$endc}
- {$ifc not defined __x86_64__ and defined CPUX86_64}
- {$setc __x86_64__ := 1}
- {$elsec}
- {$setc __x86_64__ := 0}
- {$endc}
- {$ifc not defined __arm__ and defined CPUARM}
- {$setc __arm__ := 1}
- {$elsec}
- {$setc __arm__ := 0}
- {$endc}
- {$ifc not defined __arm64__ and defined CPUAARCH64}
- {$setc __arm64__ := 1}
- {$elsec}
- {$setc __arm64__ := 0}
- {$endc}
- {$ifc defined cpu64}
- {$setc __LP64__ := 1}
- {$elsec}
- {$setc __LP64__ := 0}
- {$endc}
- {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
- {$error Conflicting definitions for __ppc__ and __i386__}
- {$endc}
- {$ifc defined __ppc__ and __ppc__}
- {$setc TARGET_CPU_PPC := TRUE}
- {$setc TARGET_CPU_PPC64 := FALSE}
- {$setc TARGET_CPU_X86 := FALSE}
- {$setc TARGET_CPU_X86_64 := FALSE}
- {$setc TARGET_CPU_ARM := FALSE}
- {$setc TARGET_CPU_ARM64 := FALSE}
- {$setc TARGET_OS_MAC := TRUE}
- {$setc TARGET_OS_IPHONE := FALSE}
- {$setc TARGET_IPHONE_SIMULATOR := FALSE}
- {$setc TARGET_OS_EMBEDDED := FALSE}
- {$elifc defined __ppc64__ and __ppc64__}
- {$setc TARGET_CPU_PPC := FALSE}
- {$setc TARGET_CPU_PPC64 := TRUE}
- {$setc TARGET_CPU_X86 := FALSE}
- {$setc TARGET_CPU_X86_64 := FALSE}
- {$setc TARGET_CPU_ARM := FALSE}
- {$setc TARGET_CPU_ARM64 := FALSE}
- {$setc TARGET_OS_MAC := TRUE}
- {$setc TARGET_OS_IPHONE := FALSE}
- {$setc TARGET_IPHONE_SIMULATOR := FALSE}
- {$setc TARGET_OS_EMBEDDED := FALSE}
- {$elifc defined __i386__ and __i386__}
- {$setc TARGET_CPU_PPC := FALSE}
- {$setc TARGET_CPU_PPC64 := FALSE}
- {$setc TARGET_CPU_X86 := TRUE}
- {$setc TARGET_CPU_X86_64 := FALSE}
- {$setc TARGET_CPU_ARM := FALSE}
- {$setc TARGET_CPU_ARM64 := FALSE}
- {$ifc defined iphonesim}
- {$setc TARGET_OS_MAC := FALSE}
- {$setc TARGET_OS_IPHONE := TRUE}
- {$setc TARGET_IPHONE_SIMULATOR := TRUE}
- {$elsec}
- {$setc TARGET_OS_MAC := TRUE}
- {$setc TARGET_OS_IPHONE := FALSE}
- {$setc TARGET_IPHONE_SIMULATOR := FALSE}
- {$endc}
- {$setc TARGET_OS_EMBEDDED := FALSE}
- {$elifc defined __x86_64__ and __x86_64__}
- {$setc TARGET_CPU_PPC := FALSE}
- {$setc TARGET_CPU_PPC64 := FALSE}
- {$setc TARGET_CPU_X86 := FALSE}
- {$setc TARGET_CPU_X86_64 := TRUE}
- {$setc TARGET_CPU_ARM := FALSE}
- {$setc TARGET_CPU_ARM64 := FALSE}
- {$ifc defined iphonesim}
- {$setc TARGET_OS_MAC := FALSE}
- {$setc TARGET_OS_IPHONE := TRUE}
- {$setc TARGET_IPHONE_SIMULATOR := TRUE}
- {$elsec}
- {$setc TARGET_OS_MAC := TRUE}
- {$setc TARGET_OS_IPHONE := FALSE}
- {$setc TARGET_IPHONE_SIMULATOR := FALSE}
- {$endc}
- {$setc TARGET_OS_EMBEDDED := FALSE}
- {$elifc defined __arm__ and __arm__}
- {$setc TARGET_CPU_PPC := FALSE}
- {$setc TARGET_CPU_PPC64 := FALSE}
- {$setc TARGET_CPU_X86 := FALSE}
- {$setc TARGET_CPU_X86_64 := FALSE}
- {$setc TARGET_CPU_ARM := TRUE}
- {$setc TARGET_CPU_ARM64 := FALSE}
- {$setc TARGET_OS_MAC := FALSE}
- {$setc TARGET_OS_IPHONE := TRUE}
- {$setc TARGET_IPHONE_SIMULATOR := FALSE}
- {$setc TARGET_OS_EMBEDDED := TRUE}
- {$elifc defined __arm64__ and __arm64__}
- {$setc TARGET_CPU_PPC := FALSE}
- {$setc TARGET_CPU_PPC64 := FALSE}
- {$setc TARGET_CPU_X86 := FALSE}
- {$setc TARGET_CPU_X86_64 := FALSE}
- {$setc TARGET_CPU_ARM := FALSE}
- {$setc TARGET_CPU_ARM64 := TRUE}
- {$ifc defined ios}
- {$setc TARGET_OS_MAC := FALSE}
- {$setc TARGET_OS_IPHONE := TRUE}
- {$setc TARGET_OS_EMBEDDED := TRUE}
- {$elsec}
- {$setc TARGET_OS_MAC := TRUE}
- {$setc TARGET_OS_IPHONE := FALSE}
- {$setc TARGET_OS_EMBEDDED := FALSE}
- {$endc}
- {$setc TARGET_IPHONE_SIMULATOR := FALSE}
- {$elsec}
- {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
- {$endc}
- {$ifc defined __LP64__ and __LP64__ }
- {$setc TARGET_CPU_64 := TRUE}
- {$elsec}
- {$setc TARGET_CPU_64 := FALSE}
- {$endc}
- {$ifc defined FPC_BIG_ENDIAN}
- {$setc TARGET_RT_BIG_ENDIAN := TRUE}
- {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
- {$elifc defined FPC_LITTLE_ENDIAN}
- {$setc TARGET_RT_BIG_ENDIAN := FALSE}
- {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
- {$elsec}
- {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
- {$endc}
- {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
- {$setc CALL_NOT_IN_CARBON := FALSE}
- {$setc OLDROUTINENAMES := FALSE}
- {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
- {$setc OPAQUE_UPP_TYPES := TRUE}
- {$setc OTCARBONAPPLICATION := TRUE}
- {$setc OTKERNEL := FALSE}
- {$setc PM_USE_SESSION_APIS := TRUE}
- {$setc TARGET_API_MAC_CARBON := TRUE}
- {$setc TARGET_API_MAC_OS8 := FALSE}
- {$setc TARGET_API_MAC_OSX := TRUE}
- {$setc TARGET_CARBON := TRUE}
- {$setc TARGET_CPU_68K := FALSE}
- {$setc TARGET_CPU_MIPS := FALSE}
- {$setc TARGET_CPU_SPARC := FALSE}
- {$setc TARGET_OS_UNIX := FALSE}
- {$setc TARGET_OS_WIN32 := FALSE}
- {$setc TARGET_RT_MAC_68881 := FALSE}
- {$setc TARGET_RT_MAC_CFM := FALSE}
- {$setc TARGET_RT_MAC_MACHO := TRUE}
- {$setc TYPED_FUNCTION_POINTERS := TRUE}
- {$setc TYPE_BOOL := FALSE}
- {$setc TYPE_EXTENDED := FALSE}
- {$setc TYPE_LONGLONG := TRUE}
- uses MacTypes;
- {$endc} {not MACOSALLINCLUDE}
- {$ifc TARGET_OS_MAC}
- {$ALIGN MAC68K}
- const
- maxSize = $7FFFFFF0; {the largest block possible}
- {
- If you define a macro named __MAC_OS_X_MEMORY_MANAGER_CLEAN__ with a non-zero value, then
- some Memory Manager APIs will become inlined, minimal implementations. See the comments
- below for more information about this.
- }
- {$setc __MAC_OS_X_MEMORY_MANAGER_CLEAN__ := 0}
- {$ifc not __MAC_OS_X_MEMORY_MANAGER_CLEAN__}
- const
- defaultPhysicalEntryCount = 8;
- const
- { values returned from the GetPageState function }
- kPageInMemory = 0;
- kPageOnDisk = 1;
- kNotPaged = 2;
- const
- { masks for Zone->heapType field }
- k32BitHeap = 1; { valid in all Memory Managers }
- kNewStyleHeap = 2; { true if new Heap Manager is present }
- kNewDebugHeap = 4; { true if new Heap Manager is running in debug mode on this heap }
- {$endc} {not __MAC_OS_X_MEMORY_MANAGER_CLEAN__}
- { bits for use with HGetState/HSetState}
- const
- kHandleIsResourceBit = 5;
- kHandlePurgeableBit = 6;
- kHandleLockedBit = 7;
- { masks for use with HGetState/HSetState}
- const
- kHandleIsResourceMask = $20;
- kHandlePurgeableMask = $40;
- kHandleLockedMask = $80;
- {$ifc not TARGET_CPU_64}
- type
- GrowZoneProcPtr = function( cbNeeded: Size ): SIGNEDLONG;
- PurgeProcPtr = procedure( blockToPurge: Handle );
- UserFnProcPtr = procedure( parameter: UnivPtr );
- GrowZoneUPP = GrowZoneProcPtr;
- PurgeUPP = PurgeProcPtr;
- UserFnUPP = UserFnProcPtr;
- ZonePtr = ^Zone;
- Zone = record
- bkLim: Ptr;
- purgePtr: Ptr;
- hFstFree: Ptr;
- zcbFree: SIGNEDLONG;
- gzProc: GrowZoneUPP;
- moreMast: SInt16;
- flags: SInt16;
- cntRel: SInt16;
- maxRel: SInt16;
- cntNRel: SInt16;
- heapType: SInt8; { previously "maxNRel", now holds flags (e.g. k32BitHeap)}
- unused: SInt8;
- cntEmpty: SInt16;
- cntHandles: SInt16;
- minCBFree: SIGNEDLONG;
- purgeProc: PurgeUPP;
- sparePtr: Ptr;
- allocPtr: Ptr;
- heapData: SInt16;
- end;
- type
- THz = ^Zone;
- THzPtr = ^THz;
- {$ifc not __MAC_OS_X_MEMORY_MANAGER_CLEAN__}
- type
- MemoryBlockPtr = ^MemoryBlock;
- MemoryBlock = record
- address: UnivPtr;
- count: UNSIGNEDLONG;
- end;
- type
- LogicalToPhysicalTablePtr = ^LogicalToPhysicalTable;
- LogicalToPhysicalTable = record
- logical: MemoryBlock;
- physical: array [0..7] of MemoryBlock;
- end;
- PageState = SInt16;
- StatusRegisterContents = SInt16;
- const
- kVolumeVirtualMemoryInfoVersion1 = 1; { first version of VolumeVirtualMemoryInfo}
- type
- VolumeVirtualMemoryInfo = record
- version: PBVersion; { Input: Version of the VolumeVirtualMemoryInfo structure}
- volumeRefNum: SInt16; { Input: volume reference number}
- inUse: Boolean; { output: true if volume is currently used for file mapping}
- _fill: UInt8;
- vmOptions: UInt32; { output: tells what volume can support (same as DriverGestaltVMOptionsResponse vmOptions bits in DriverGestalt)}
- { end of kVolumeVirtualMemoryInfoVersion1 structure}
- end;
- VolumeVirtualMemoryInfoPtr = ^VolumeVirtualMemoryInfo;
- {$endc} {not __MAC_OS_X_MEMORY_MANAGER_CLEAN__}
- {
- * NewGrowZoneUPP()
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: available as macro/inline
- }
- function NewGrowZoneUPP( userRoutine: GrowZoneProcPtr ): GrowZoneUPP; external name '_NewGrowZoneUPP';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
- {
- * NewPurgeUPP()
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: available as macro/inline
- }
- function NewPurgeUPP( userRoutine: PurgeProcPtr ): PurgeUPP; external name '_NewPurgeUPP';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
- {
- * NewUserFnUPP()
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: available as macro/inline
- }
- function NewUserFnUPP( userRoutine: UserFnProcPtr ): UserFnUPP; external name '_NewUserFnUPP';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
- {
- * DisposeGrowZoneUPP()
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: available as macro/inline
- }
- procedure DisposeGrowZoneUPP( userUPP: GrowZoneUPP ); external name '_DisposeGrowZoneUPP';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
- {
- * DisposePurgeUPP()
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: available as macro/inline
- }
- procedure DisposePurgeUPP( userUPP: PurgeUPP ); external name '_DisposePurgeUPP';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
- {
- * DisposeUserFnUPP()
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: available as macro/inline
- }
- procedure DisposeUserFnUPP( userUPP: UserFnUPP ); external name '_DisposeUserFnUPP';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
- {
- * InvokeGrowZoneUPP()
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: available as macro/inline
- }
- function InvokeGrowZoneUPP( cbNeeded: Size; userUPP: GrowZoneUPP ): SIGNEDLONG; external name '_InvokeGrowZoneUPP';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
- {
- * InvokePurgeUPP()
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: available as macro/inline
- }
- procedure InvokePurgeUPP( blockToPurge: Handle; userUPP: PurgeUPP ); external name '_InvokePurgeUPP';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
- {
- * InvokeUserFnUPP()
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: available as macro/inline
- }
- procedure InvokeUserFnUPP( parameter: UnivPtr; userUPP: UserFnUPP ); external name '_InvokeUserFnUPP';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
- {$endc} {not TARGET_CPU_64}
- {
- * MemError()
- *
- * Summary:
- * Determines if an applicationÕs last direct call to a Memory
- * Manager function executed successfully.
- *
- * Discussion:
- * MemError() yields the result code produced by the last Memory
- * Manager function your application called directly, and resets
- * MemError() to return noErr in the future. MemError() is useful
- * during application debugging. You might also use MemError as one
- * part of a memory-management scheme to identify instances in which
- * the Memory Manager rejects overly large memory requests by
- * returning the error code memFullErr.
- *
- * To view the result codes that MemError() can produce, see "Memory
- * Manager Result Codes".
- *
- * Do not rely on MemError() as the only component of a
- * memory-management scheme. For example, suppose you call NewHandle
- * or NewPtr and receive the result code noErr, indicating that the
- * Memory Manager was able to allocate sufficient memory. In this
- * case, you have no guarantee that the allocation did not deplete
- * your applicationÕs memory reserves to levels so low that simple
- * operations might cause your application to crash. Instead of
- * relying on MemError(), check before making a memory request that
- * there is enough memory both to fulfill the request and to support
- * essential operations.
- *
- * On Mac OS X 10.3 and later, the value of MemError() is kept for
- * each thread; prior to Mac OS X 10.3. MemError() is global to the
- * application. Because of this, and other problems, the Memory
- * Manager APIs are not thread safe before Mac OS X 10.3.
- *
- * Mac OS X threading:
- * Thread safe since version 10.3
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function MemError: OSErr; external name '_MemError';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
- {
- * LMGetMemErr()
- *
- * Summary:
- * Returns the result of the last Memory Manager function, without
- * clearing the value like MemError() does.
- *
- * Discussion:
- * LMGetMemErr yields the result code produced by the last Memory
- * Manager function your application called directly. Unlike
- * MemError(), this function does not reset the stored value, so
- * subsequent calls to LMGetMemErr() will still return this value
- * until the next Memory Manager routine is called or until
- * MemError() is called to reset the value. LMGetMemErr is useful
- * during application debugging. You might also use this value as
- * one part of a memory-management scheme to identify instances in
- * which the Memory Manager rejects overly large memory requests by
- * returning the error code memFullErr.
- *
- * To view the result codes that MemError() can produce, see "Memory
- * Manager Result Codes".
- *
- * Do not rely on MemError() as the only component of a
- * memory-management scheme. For example, suppose you call NewHandle
- * or NewPtr and receive the result code noErr, indicating that the
- * Memory Manager was able to allocate sufficient memory. In this
- * case, you have no guarantee that the allocation did not deplete
- * your applicationÕs memory reserves to levels so low that simple
- * operations might cause your application to crash. Instead of
- * relying on MemError(), check before making a memory request that
- * there is enough memory both to fulfill the request and to support
- * essential operations.
- *
- * On Mac OS X 10.3 and later, the value of MemError() is kept for
- * each thread; prior to Mac OS X 10.3 there was one global value of
- * MemError() which all threads shared. Because of this, and other
- * problems, the Memory Manager APIs are not thread safe before Mac
- * OS X 10.3.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function LMGetMemErr: SInt16; external name '_LMGetMemErr';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
- {
- * LMSetMemErr()
- *
- * Summary:
- * Set the value which will be returned by MemError()
- *
- * Discussion:
- * User code shouldn't need to call this function, which is used to
- * set the value which the next call to MemError() will return.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * value:
- * the value which the next MemError() function call should return
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- procedure LMSetMemErr( value: SInt16 ); external name '_LMSetMemErr';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
- {
- * NewHandle()
- *
- * Summary:
- * Allocate a relocatable memory block of a specified size.
- *
- * Discussion:
- * The NewHandle function attempts to allocate a new relocatable
- * block in the current heap zone with a logical size of logicalSize
- * bytes and then return a handle to the block. The new block is
- * unlocked and unpurgeable. If NewHandle cannot allocate a block of
- * the requested size, it returns NULL. The memory block returned
- * likely will contain garbage, and will be unlocked and
- * non-purgeable.
- *
- * WARNING
- *
- * Do not try to manufacture your own handles without this function
- * by simply assigning the address of a variable of type Ptr to a
- * variable of type Handle. The resulting "fake handle" would not
- * reference a relocatable block and could cause a system crash.
- * If this function returns NIL, the error result can be determined
- * by calling the function MemError().
- *
- * Mac OS X threading:
- * Thread safe since version 10.3
- *
- * Parameters:
- *
- * byteCount:
- * the size of the relocatable memory block to allocate. If this
- * value is < 0, NIL will be returned. If this value is 0, a
- * handle to 0 byte block will be returned.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function NewHandle( byteCount: Size ): Handle; external name '_NewHandle';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
- {
- * NewHandleClear()
- *
- * Summary:
- * Allocate a relocatable memory block of a specified size.
- *
- * Discussion:
- * The NewHandle function attempts to allocate a new relocatable
- * block in the current heap zone with a logical size of logicalSize
- * bytes and then return a handle to the block. The new block is
- * unlocked and unpurgeable. If NewHandle cannot allocate a block of
- * the requested size, it returns NULL. The memory block returned
- * will be zeroed, and will be unlocked and non-purgeable.
- *
- * WARNING
- *
- * Do not try to manufacture your own handles without this function
- * by simply assigning the address of a variable of type Ptr to a
- * variable of type Handle. The resulting "fake handle" would not
- * reference a relocatable block and could cause a system crash.
- * If this function returns NIL, the error result can be determined
- * by calling the function MemError().
- *
- * Mac OS X threading:
- * Thread safe since version 10.3
- *
- * Parameters:
- *
- * byteCount:
- * the size of the relocatable memory block to allocate. If this
- * value is < 0, NIL will be returned. If this value is 0, a
- * handle to 0 byte block will be returned.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function NewHandleClear( byteCount: Size ): Handle; external name '_NewHandleClear';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
- {
- * RecoverHandle()
- *
- * Summary:
- * Returns a handle to a relocatable block pointed to by a specified
- * pointer.
- *
- * Discussion:
- * The Memory Manager does not allow you to change relocatable
- * blocks into nonrelocatable blocks, or vice-versa. However, if you
- * no longer have access to a handle but still have access to its
- * master pointer p, you can use the RecoverHandle function to
- * recreate a handle to the relocatable block referenced by
- * p.
- *
- * Call the function MemError() to get the result code. See "Memory
- * Manager Result Codes".
- *
- * Mac OS X threading:
- * Thread safe since version 10.3
- *
- * Parameters:
- *
- * p:
- * the master pointer to a relocatable block.
- *
- * Result:
- * A handle to a relocatable block point to by p. If p does not
- * point to a valid block, this function returns NULL.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function RecoverHandle( p: Ptr ): Handle; external name '_RecoverHandle';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
- {
- * NewPtr()
- *
- * Summary:
- * Allocates a nonrelocatable block of memory of a specified size.
- *
- * Discussion:
- * The NewPtr function attempts to reserve space for the new block.
- * If it is able to reserve the requested amount of space, NewPtr
- * allocates the nonrelocatable block. Otherwise, NewPtr returns
- * NULL and generates a memFullErr error. On Mac OS X, NewPtr will
- * never fail because it is unable to allocate the pointer. Certain
- * old versions of Mac OS X return a NULL pointer when asked to
- * allocate a pointer of size 0.
- * Call the function MemError to get the result code. See "Memory
- * Manager Result Codes".
- *
- * Mac OS X threading:
- * Thread safe since version 10.3
- *
- * Parameters:
- *
- * byteCount:
- * The requested size (in bytes) of the nonrelocatable block. If
- * you pass a value of zero, this function returns a valid zero
- * length pointer.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function NewPtr( byteCount: Size ): Ptr; external name '_NewPtr';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
- {
- * NewPtrClear()
- *
- * Summary:
- * Allocates a nonrelocatable block of memory of a specified size
- * with all its bytes set to 0.
- *
- * Discussion:
- * The NewPtr function attempts to reserve space for the new block.
- * If it is able to reserve the requested amount of space, NewPtr
- * allocates the nonrelocatable block. Otherwise, NewPtr returns
- * NULL and generates a memFullErr error. On Mac OS X, NewPtr will
- * never fail because it is unable to allocate the pointer. Certain
- * old versions of Mac OS X return a NULL pointer when asked to
- * allocate a pointer of size 0.
- * Call the function MemError to get the result code. See "Memory
- * Manager Result Codes".
- *
- * Mac OS X threading:
- * Thread safe since version 10.3
- *
- * Parameters:
- *
- * byteCount:
- * The requested size (in bytes) of the nonrelocatable block. If
- * you pass a value of zero, this function returns a valid zero
- * length pointer.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function NewPtrClear( byteCount: Size ): Ptr; external name '_NewPtrClear';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
- {$ifc not TARGET_CPU_64}
- {
- * MaxBlock() *** DEPRECATED ***
- *
- * Summary:
- * Return the size of the largest block you could allocate in the
- * current heap zone after compaction.
- *
- * Discussion:
- * On Mac OS X, this function always returns a large value, because
- * virtual memory is always available to fulfill any request for
- * memory. This function is deprecated on Mac OS X and later. You
- * can assume that any reasonable memory allocation will succeed.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function MaxBlock: SIGNEDLONG; external name '_MaxBlock';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_5, __IPHONE_NA, __IPHONE_NA) *)
- {
- * StackSpace() *** DEPRECATED ***
- *
- * Summary:
- * Returns the amount of space unused on the current thread's stack.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function StackSpace: SIGNEDLONG; external name '_StackSpace';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_5, __IPHONE_NA, __IPHONE_NA) *)
- {$endc} {not TARGET_CPU_64}
- {
- * NewEmptyHandle()
- *
- * Summary:
- * Initializes a new handle without allocating any memory for it to
- * control.
- *
- * Discussion:
- * When you want to allocate memory for the empty handle, use the
- * ReallocateHandle function.
- * Call the function MemError to get the result code. See "Memory
- * Manager Result Codes".
- *
- * Mac OS X threading:
- * Thread safe since version 10.3
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function NewEmptyHandle: Handle; external name '_NewEmptyHandle';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
- {
- * HLock()
- *
- * Summary:
- * Lock a relocatable block so that it does not move in the heap
- *
- * Discussion:
- * The HLock procedure locks the relocatable block to which h is a
- * handle, preventing it from being moved within its heap zone. If
- * the block is already locked,HLock does nothing.
- *
- * On Mac OS X, the behaviour of the Memory Manager and of heaps in
- * general is different than on Mac OS 9.x and earlier. In
- * particular, the heap on Mac OS X is never purged or compacted.
- * Therefore, an unlocked handle will never be relocated except as a
- * result of a direct action by something calling SetHandleSize() or
- * by using a function like PtrAndHand() which implicitly resizes
- * the handle to append data to it. Because of this, most locking
- * and unlocking of handles is unnecessary on Mac OS X, and the use
- * of HLock() and other functions is being deprecated. If you
- * define a macro named __MAC_OS_X_MEMORY_MANAGER_CLEAN__ to 1 in
- * your sources before you include MacMemory.h, then HLock() and
- * several other functions will become empty operations, removing
- * the overhead of a function call.
- *
- * However, some applications are relying on the behavior that
- * resizing a locked handle produces an error, or tracking the state
- * of the locked bit for a give handle via the HGetState() function.
- * Applications which rely on this can not use
- * __MAC_OS_X_MEMORY_MANAGER_CLEAN__.
- *
- * Mac OS X threading:
- * Thread safe since version 10.3
- *
- * Parameters:
- *
- * h:
- * the handle to lock. If h is == NULL, then HLock() sets
- * MemError() to noErr.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- procedure HLock( h: Handle ); external name '_HLock';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
- {
- * HLockHi()
- *
- * Summary:
- * Lock a relocatable handle.
- *
- * Discussion:
- * The HLockHi() function locks a handle in memory. On versions of
- * Mac OS before Mac OS X, it would first attempt to move the handle
- * as high in memory as feasible. However, on Mac OS X and later,
- * there is no advantage to having handles high in memory, and so
- * this function never moves a handle before locking it.
- * See the discussion about handle locking above the function
- * HLock().
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * h:
- * the handle to lock. If h is == NULL, then HLockHi() sets
- * MemError() to noErr.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- procedure HLockHi( h: Handle ); external name '_HLockHi';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
- {
- * HUnlock()
- *
- * Summary:
- * Unlock a relocatable block so that it does not move in the heap
- *
- * Discussion:
- * The HUnlock procedure unlocks the relocatable block to which h is
- * a handle, allowing it from being moved within its heap zone. If
- * the block is already unlocked, HUnlock does nothing.
- *
- * See the discussion about handles and locking on Mac OS X above
- * the HLock() function.
- *
- * Mac OS X threading:
- * Thread safe since version 10.3
- *
- * Parameters:
- *
- * h:
- * the handle to unlock. If h is == NULL, then HUnlock() sets
- * MemError() to noErr.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- procedure HUnlock( h: Handle ); external name '_HUnlock';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
- {$ifc not TARGET_CPU_64}
- {
- * HPurge() *** DEPRECATED ***
- *
- * Summary:
- * Mark a relocatable block so that it does can be purged if a
- * memory request cannot be fulfilled after compaction of the heap
- *
- * Discussion:
- * The HPurge procedure makes the relocatable block to which h is a
- * handle purgeable. If the block is already purgeable, HPurge does
- * nothing.
- *
- * On Mac OS X, heaps are never purged. Therefore, the use of
- * HPurge() and its associated functios is deprecated. If you define
- * a macro __MAC_OS_X_MEMORY_MANAGER_CLEAN__ in your sources before
- * you include MacMemory.h, then any calls to HPurge() in your
- * program will essentially be removed.
- *
- * However, some applications may set the handle as purgeable, and
- * then later check the purgeBit for the handle via HGetState(). If
- * your application depends on the purge bit being set for handles,
- * you will not be able to take advantage of this macro.
- *
- * Mac OS X threading:
- * Thread safe since version 10.3
- *
- * Parameters:
- *
- * h:
- * the handle to mark as purgeable. If h is == NULL, then
- * HPurge() just sets MemError() to noErr.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- procedure HPurge( h: Handle ); external name '_HPurge';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
- {
- * HNoPurge() *** DEPRECATED ***
- *
- * Summary:
- * Mark a relocatable block so that it can not be purged.
- *
- * Discussion:
- * The HNoPurge procedure makes the relocatable block to which h is
- * a handle unpurgeable. See the discussion about purgable handles
- * above the HPurge() function.
- *
- * Mac OS X threading:
- * Thread safe since version 10.3
- *
- * Parameters:
- *
- * h:
- * the handle to mark as nonpurgeable. If h is == NULL, then
- * HPurge() just sets MemError() to noErr.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- procedure HNoPurge( h: Handle ); external name '_HNoPurge';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
- {$endc} {not TARGET_CPU_64}
- {
- * TempNewHandle()
- *
- * Summary:
- * Allocate a relocatable memory block of a specified size.
- *
- * Discussion:
- * The TempNewHandle function attempts to allocate a new relocatable
- * block in the current heap zone with a logical size of logicalSize
- * bytes and then return a handle to the block. The new block is
- * unlocked and unpurgeable. If NewHandle cannot allocate a block of
- * the requested size, it returns NULL. The memory block returned
- * likely will contain garbage.
- *
- * WARNING
- *
- * Do not try to manufacture your own handles without this function
- * by simply assigning the address of a variable of type Ptr to a
- * variable of type Handle. The resulting "fake handle" would not
- * reference a relocatable block and could cause a system crash.
- * If this function returns NIL, the error result can be determined
- * by calling the function MemError().
- *
- * On Mac OS X, there is no temporary memory heap, and thus no
- * difference between the handles returned by TempNewHandle() and
- * those returned by NewHandle(). The only difference between the
- * two is that TempNewHandle() also returns the error result of the
- * call in resultCode.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * logicalSize:
- * the size of the relocatable memory block to allocate. If this
- * value is < 0, NIL will be returned. If this value is 0, a
- * handle to 0 byte block will be returned.
- *
- * resultCode:
- * On exit, this will be set to the result of the operation.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function TempNewHandle( logicalSize: Size; var resultCode: OSErr ): Handle; external name '_TempNewHandle';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
- {$ifc not TARGET_CPU_64}
- {
- * TempMaxMem() *** DEPRECATED ***
- *
- * Summary:
- * Return the maximum amount of temporary memory available
- *
- * Discussion:
- * On Mac OS X, this function always returns a large value, because
- * virtual memory is always available to fulfill any request for
- * memory. This function is deprecated on Mac OS X and later. You
- * can assume that any reasonable memory allocation will succeed.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * grow:
- * If != NULL, then this is filled in with the the value 0.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function TempMaxMem( var grow: Size ): Size; external name '_TempMaxMem';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
- {
- * TempFreeMem() *** DEPRECATED ***
- *
- * Summary:
- * Return the maximum amount of free memory in the temporary heap.
- *
- * Discussion:
- * On Mac OS X, there is no separate temporary memory heap. This
- * function always returns a large value, because virtual memory is
- * always available to fulfill any request for memory. This
- * function is deprecated on Mac OS X and later. You can assume
- * that any reasonable memory allocation will succeed.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function TempFreeMem: SIGNEDLONG; external name '_TempFreeMem';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
- {
- * CompactMem() *** DEPRECATED ***
- *
- * Summary:
- * Compact the heap by purging and moving blocks such that at least
- * cbNeeded bytes are available, if possible.
- *
- * Discussion:
- * On Mac OS X and later, blocks are never purged and memory heaps
- * will grow as necessary, so compaction is never necessary nor
- * performed.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function CompactMem( cbNeeded: Size ): Size; external name '_CompactMem';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
- {
- * PurgeMem() *** DEPRECATED ***
- *
- * Summary:
- * Purge blocks from the heap until cbNeeded bytes are available, if
- * possible.
- *
- * Discussion:
- * On Mac OS X and later, blocks are never purged and memory heaps
- * will grow as necessary, so purging of a heap is never necessary
- * nor performed.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- procedure PurgeMem( cbNeeded: Size ); external name '_PurgeMem';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
- {
- * FreeMem() *** DEPRECATED ***
- *
- * Summary:
- * Return the maximum amount of free memory in the temporary heap.
- *
- * Discussion:
- * On Mac OS X, this function always returns a large value, because
- * virtual memory is always available to fulfill any request for
- * memory. This function is deprecated on Mac OS X and later. You
- * can assume that any reasonable memory allocation will succeed.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- *
- * Note:
- * FreeMem has been renamed MacFreeMem, to resolve a naming conflict with
- * FreeMem in the Turbo Pascal/Delphi/FreePascal runtime library
- }
- function MacFreeMem: SInt32; external name '_FreeMem';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_5, __IPHONE_NA, __IPHONE_NA) *)
- {
- * MaxMem() *** DEPRECATED ***
- *
- * Summary:
- * Return the maximum amount of free memory available
- *
- * Discussion:
- * On Mac OS X, this function always returns a large value, because
- * virtual memory is always available to fulfill any request for
- * memory. This function is deprecated on Mac OS X and later. You
- * can assume that any reasonable memory allocation will succeed.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * grow:
- * If != NULL, then this is filled in with the the value 0.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function MaxMem( var grow: Size ): Size; external name '_MaxMem';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_5, __IPHONE_NA, __IPHONE_NA) *)
- {
- * SetGrowZone() *** DEPRECATED ***
- *
- * Summary:
- * Set a function which is called when a heap is grown
- *
- * Discussion:
- * On Mac OS X and later, heaps never grow, and so the function set
- * by SetGrowZone() is never called.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * growZone:
- * a upp for a function to call when a heap needs to be grown
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- procedure SetGrowZone( growZone: GrowZoneUPP ); external name '_SetGrowZone';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
- {
- * GetGrowZone() *** DEPRECATED ***
- *
- * Summary:
- * Get the function which is called when a heap is grown
- *
- * Discussion:
- * On Mac OS X and later, heaps never grow, and so this function (
- * set by SetGrowZone() ) is never called.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
- * CarbonLib: in CarbonLib 1.1 and later
- * Non-Carbon CFM: not available
- }
- function GetGrowZone: GrowZoneUPP; external name '_GetGrowZone';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
- {
- * MoveHHi() *** DEPRECATED ***
- *
- * Summary:
- * Move a handle as high in memory as possible
- *
- * Discussion:
- * On versions of Mac OS before Mac OS X, MoveHHi() would move the
- * handle as high in memory as feasible. However, on Mac OS X and
- * later, there is no advantage to having handles high in memory,
- * and so this function never moves a handle before locking it.
- * See the discussion about handle locking above the function
- * HLock().
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * h:
- * the handle to move
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- procedure MoveHHi( h: Handle ); external name '_MoveHHi';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
- {$endc} {not TARGET_CPU_64}
- {
- * DisposePtr()
- *
- * Summary:
- * Release memory occupied by a nonrelocatable block
- *
- * Discussion:
- * When you no longer need a nonrelocatable block, call the
- * DisposePtr function to free it for other uses.
- * Call the function MemError to get the result code. See "Memory
- * Manager Result Codes".
- * After a call to DisposePtr, all pointers to the released block
- * become invalid and should not be used again. Any subsequent use
- * of a pointer to the released block might cause a system error.
- * You can pass the value NULL as the pointer to dispose.
- *
- * Mac OS X threading:
- * Thread safe since version 10.3
- *
- * Parameters:
- *
- * p:
- * A pointer to the nonrelocatable block you want to dispose of
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- procedure DisposePtr( p: Ptr ); external name '_DisposePtr';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
- {
- * GetPtrSize()
- *
- * Summary:
- * Returns the logical size of the nonrelocatable block
- * corresponding to a pointer.
- *
- * Discussion:
- * This function returns the number of bytes used for the given
- * pointer. Call the function MemError to get the result code. See
- * "Memory Manager Result Codes".
- *
- * Mac OS X threading:
- * Thread safe since version 10.3
- *
- * Parameters:
- *
- * p:
- * a pointer to a nonrelocatable block.
- *
- * Result:
- * The logical size, in bytes, of the nonrelocatable block pointed
- * to by p. In case of error, the function returns 0.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function GetPtrSize( p: Ptr ): Size; external name '_GetPtrSize';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
- {
- * SetPtrSize()
- *
- * Mac OS X threading:
- * Thread safe since version 10.3
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- procedure SetPtrSize( p: Ptr; newSize: Size ); external name '_SetPtrSize';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
- {
- * DisposeHandle()
- *
- * Summary:
- * Releases memory occupied by a relocatable block.
- *
- * Discussion:
- * The DisposeHandle function releases the memory occupied by the
- * relocatable block whose handle is h. It also frees the handleÕs
- * master pointer for other uses.
- * Do not use DisposeHandle to dispose of a handle obtained from the
- * Resource Manager (for example, by a previous call to
- * GetResource), useReleaseResource instead. If, however, you have
- * called DetachResource on a resource handle, you should dispose of
- * the storage by callingDisposeHandle.
- * Call the function MemError to get the result code. See "Memory
- * Manager Result Codes".
- * After a call to DisposeHandle, all handles to the released block
- * become invalid and should not be used again. Any subsequent calls
- * to DisposeHandleusing an invalid handle might damage the master
- * pointer list. You can pass the value NULL as the handle to
- * dispose.
- *
- * Mac OS X threading:
- * Thread safe since version 10.3
- *
- * Parameters:
- *
- * h:
- * A handle to a relocatable block.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- procedure DisposeHandle( h: Handle ); external name '_DisposeHandle';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
- {
- * SetHandleSize()
- *
- * Summary:
- * Changes the logical size of the relocatable block corresponding
- * to the specified handle.
- *
- * Discussion:
- * Change the logical size of the relocatable block corresponding to
- * the specified handle. SetHandleSize might need to move the
- * relocatable block to obtain enough space for the resized block.
- * Thus, for best results you should unlock a block before resizing
- * it.
- *
- * An attempt to increase the size of a locked block might fail,
- * because of blocks above and below it that are either
- * nonrelocatable or locked. You should be prepared for this
- * possibility.
- *
- * Instead of using the SetHandleSize function to set the size of a
- * handle to 0, you can use the EmptyHandle function.
- *
- * Mac OS X threading:
- * Thread safe since version 10.3
- *
- * Parameters:
- *
- * h:
- * a handle to a relocatable block.
- *
- * newSize:
- * the desired new logical size, in bytes, of the relocatable
- * block.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- procedure SetHandleSize( h: Handle; newSize: Size ); external name '_SetHandleSize';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
- {
- * GetHandleSize()
- *
- * Summary:
- * Returns the logical size of the relocatable block corresponding
- * to a handle.
- *
- * Discussion:
- * Returns the logical size of the relocatable block corresponding
- * to a handle. Call the function MemError to get the result code.
- * See "Memory Manager Result Codes".
- *
- * Mac OS X threading:
- * Thread safe since version 10.3
- *
- * Parameters:
- *
- * h:
- * a handle to a relocatable block.
- *
- * Result:
- * The logical size, in bytes, of the relocatable block whose handle
- * is h. In case of error, the function return 0.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function GetHandleSize( h: Handle ): Size; external name '_GetHandleSize';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
- {
- * ReallocateHandle()
- *
- * Summary:
- * Allocates a new relocatable block of a specified size and sets a
- * handleÕs master pointer to point to the new block.
- *
- * Discussion:
- * Usually you use ReallocateHandle to reallocate space for a block
- * that you have emptied. If the handle references an existing
- * block, ReallocateHandle releases that block before creating a new
- * one.
- *
- * To reallocate space for a resource that has been purged, you
- * should call LoadResource, not ReallocateHandle. To resize
- * relocatable blocks, you should call the SetHandleSize
- * function.
- *
- * Call the function MemError to get the result code. See "Memory
- * Manager Result Codes".
- *
- * Mac OS X threading:
- * Thread safe since version 10.3
- *
- * Parameters:
- *
- * h:
- * A handle to a relocatable block.
- *
- * byteCount:
- * the desired new logical size (in bytes) of the relocatable
- * block. The new block is unlocked and unpurgeable.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- procedure ReallocateHandle( h: Handle; byteCount: Size ); external name '_ReallocateHandle';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
- {
- * EmptyHandle()
- *
- * Summary:
- * Purges a relocatable block and sets the corresponding handleÕs
- * master pointer to NULL.
- *
- * Discussion:
- * The EmptyHandle function purges the relocatable block whose
- * handle is h and sets the handleÕs master pointer to NULL. The
- * EmptyHandle function allows you to free memory taken by a
- * relocatable block without freeing the relocatable blockÕs master
- * pointer for other uses. The block whose handle is h must be
- * unlocked but need not be purgeable.
- *
- * Note that if there are multiple handles to the relocatable block,
- * then calling the EmptyHandle function empties them all, because
- * all of the handles share a common master pointer. When you later
- * use ReallocateHandle to reallocate space for the block, the
- * master pointer is updated, and all of the handles reference the
- * new block correctly.
- *
- * To free the memory taken up by a relocatable block and release
- * the blockÕs master pointer for other uses, use the DisposeHandle
- * function.
- *
- * Call the function MemError to get the result code. See "Memory
- * Manager Result Codes".
- *
- * Mac OS X threading:
- * Thread safe since version 10.3
- *
- * Parameters:
- *
- * h:
- * a handle to a relocatable block.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- procedure EmptyHandle( h: Handle ); external name '_EmptyHandle';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
- {
- * HSetRBit()
- *
- * Summary:
- * Set the "R" bit for the handle state.
- *
- * Mac OS X threading:
- * Thread safe since version 10.3
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- procedure HSetRBit( h: Handle ); external name '_HSetRBit';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
- {
- * HClrRBit()
- *
- * Summary:
- * Clear the "R" bit for the handle state.
- *
- * Mac OS X threading:
- * Thread safe since version 10.3
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- procedure HClrRBit( h: Handle ); external name '_HClrRBit';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
- {
- * HGetState()
- *
- * Summary:
- * Get the current state of the handle's locked, purgeable, and R
- * bits
- *
- * Discussion:
- * The HGetState function returns a signed byte (char) containing
- * the flags of the master pointer for the given handle. You can
- * save this byte, change the state of any of the flags using the
- * functions described in this section, and then restore their
- * original states by passing the byte to the HSetState
- * function.
- *
- * You can use bit-manipulation functions on the returned signed
- * byte to determine the value of a given attribute.
- * Currently the following bits are used:
- * kHandleIsResourceBit - if set, handle is a resource
- * kHandlePurgeableBit - if set, handle is purgeable
- * kHandleLockedBit - if set, handle is locked
- * On Mac OS X and later, heaps are never purged, so the purgeable
- * bit is used but its setting is essentially ignored. Also, since
- * heaps are never compacted, and therefore the only time a handle
- * moves is when that handle is resized, the danger of using
- * defererenced handles is lower and so handles likely do not need
- * to be locked as often. Because of this, the state for a handle is
- * less useful, and HGetState() and other functions is being
- * deprecated. If you define a macro named
- * __MAC_OS_X_MEMORY_MANAGER_CLEAN__ in your sources before you
- * include MacMemory.h, then HGetState() and several other functions
- * will become empty operations, removing the overhead of a function
- * call.
- *
- * However, some applications may depend on the state bits of a
- * handle being correct or changing as functions like HLock(), etc.,
- * are called. Applications which rely on this can not use
- * __MAC_OS_X_MEMORY_MANAGER_CLEAN__.
- *
- * Mac OS X threading:
- * Thread safe since version 10.3
- *
- * Parameters:
- *
- * h:
- * the handle to get the state for
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function HGetState( h: Handle ): SInt8; external name '_HGetState';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
- {
- * HSetState()
- *
- * Summary:
- * Set the current state of the handle's locked, purgeable, and R
- * bits
- *
- * Discussion:
- * See the discussion about handle state and Mac OS X above the
- * function HGetState().
- *
- * Mac OS X threading:
- * Thread safe since version 10.3
- *
- * Parameters:
- *
- * h:
- * the handle to set the state for
- *
- * flags:
- * the flags to set for the handle
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- procedure HSetState( h: Handle; flags: SInt8 ); external name '_HSetState';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
- {****************************************************************************
- Beginning in Mac OS X Tiger, BlockMove, BlockMoveData, BlockMoveUncached,
- BlockMoveDataUncached, BlockZero, and BlockZeroUncached are inlined to a
- direct call to the posix memmove or bzero functions; this allows the
- compiler to optimize in some cases.
-
- However, CarbonCore.framework still exports functions with these names,
- both so old code which linked them there will run and to support
- compilers which don't support inline function definitions.
- To use the exported version of BlockMove, #define NO_BLOCKMOVE_INLINE
- in your source code ( or prefix header file ) before including any headers
- which would include MacMemory.h.
-
- ****************************************************************************}
- {$ifc not TARGET_CPU_64}
- {
- * BlockMove()
- *
- * Availability:
- * Non-Carbon CFM: in DriverServicesLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- procedure BlockMove( srcPtr: {const} UnivPtr; destPtr: UnivPtr; byteCount: Size ); external name '_BlockMove';
- {
- * BlockMoveData()
- *
- * Availability:
- * Non-Carbon CFM: in DriverServicesLib 1.0 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- procedure BlockMoveData( srcPtr: {const} UnivPtr; destPtr: UnivPtr; byteCount: Size ); external name '_BlockMoveData';
- {
- * BlockMoveUncached()
- *
- * Availability:
- * Non-Carbon CFM: in InterfaceLib 8.5 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- procedure BlockMoveUncached( srcPtr: {const} UnivPtr; destPtr: UnivPtr; byteCount: Size ); external name '_BlockMoveUncached';
- {
- * BlockMoveDataUncached()
- *
- * Availability:
- * Non-Carbon CFM: in InterfaceLib 8.5 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- procedure BlockMoveDataUncached( srcPtr: {const} UnivPtr; destPtr: UnivPtr; byteCount: Size ); external name '_BlockMoveDataUncached';
- {
- * BlockZero()
- *
- * Availability:
- * Non-Carbon CFM: in InterfaceLib 8.5 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- procedure BlockZero( destPtr: UnivPtr; byteCount: Size ); external name '_BlockZero';
- {
- * BlockZeroUncached()
- *
- * Availability:
- * Non-Carbon CFM: in InterfaceLib 8.5 and later
- * CarbonLib: in CarbonLib 1.0 and later
- * Mac OS X: in version 10.0 and later
- }
- procedure BlockZeroUncached( destPtr: UnivPtr; byteCount: Size ); external name '_BlockZeroUncached';
- {$endc} {not TARGET_CPU_64}
- {
- * HandToHand()
- *
- * Summary:
- * Copies all of the data from one relocatable block to a new
- * relocatable block.
- *
- * Discussion:
- * The HandToHand function attempts to copy the information in the
- * relocatable block to which theHndl is a handle; if successful,
- * HandToHand sets theHndlto a handle pointing to the new
- * relocatable block.
- *
- * If successful in creating a new relocatable block, the HandToHand
- * function does not duplicate the properties of the original block.
- * The new block is unlocked, unpurgeable, and not a resource. Call
- * HLock or HPurge to adjust the properties of the new
- * block.
- *
- * To copy only part of a relocatable block into a new relocatable
- * block, use the PtrToHand function. Before calling PtrToHand, lock
- * and dereference the handle pointing to the relocatable block you
- * want to copy.
- *
- * Because HandToHand replaces its parameter with the new handle,
- * you should retain the original parameter value somewhere else,
- * otherwise you will not be able to access it.
- *
- * Mac OS X threading:
- * Thread safe since version 10.3
- *
- * Parameters:
- *
- * theHndl:
- * a handle to the relocatable block whose data HandToHand will
- * copy. On return, theHndl contains a handle to a new
- * relocatable block whose data duplicates the original.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function HandToHand( var theHndl: Handle ): OSErr; external name '_HandToHand';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
- {
- * PtrToXHand()
- *
- * Summary:
- * Copies data referenced by a pointer to an existing relocatable
- * block.
- *
- * Discussion:
- * The PtrToXHand function copies the specified number of bytes from
- * the location specified by srcPtr to the handle specified by
- * dstHndl.
- *
- * Mac OS X threading:
- * Thread safe since version 10.3
- *
- * Parameters:
- *
- * srcPtr:
- * the address of the first byte to copy.
- *
- * dstHndl:
- * a handle to an existing relocatable block.
- *
- * size:
- * the number of bytes to copy.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function PtrToXHand( srcPtr: {const} UnivPtr; dstHndl: Handle; size: SIGNEDLONG ): OSErr; external name '_PtrToXHand';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
- {
- * PtrToHand()
- *
- * Summary:
- * Copies data referenced by a pointer to a new relocatable block.
- *
- * Discussion:
- * If you dereference and lock a handle, the PtrToHand function can
- * copy its data to a new handle. However, for copying data from one
- * handle to another, the HandToHand function is more efficient.
- *
- * Mac OS X threading:
- * Thread safe since version 10.3
- *
- * Parameters:
- *
- * srcPtr:
- * the address of the first byte to copy.
- *
- * dstHndl:
- * a handle for which you have not yet allocated any memory. The
- * PtrToHand function allocates memory for the handle and copies
- * the specified number of bytes beginning at srcPtr into it. The
- * dstHndl parameter is an output parameter that will hold the
- * result. Its value on entry is ignored. If no error occurs, on
- * exit it points to an unlocked, non-purgeable Handle of the
- * requested size.
- *
- * size:
- * the number of bytes to copy.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function PtrToHand( srcPtr: {const} UnivPtr; var dstHndl: Handle; size: SIGNEDLONG ): OSErr; external name '_PtrToHand';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
- {
- * HandAndHand()
- *
- * Summary:
- * Use the HandAndHand function to concatenate two relocatable
- * blocks.
- *
- * Discussion:
- * The HandAndHand function concatenates the information from the
- * relocatable block to which aHndl is a handle onto the end of the
- * relocatable block to which bHndl is a handle. The aHndl variable
- * remains unchanged.
- *
- * WARNING
- *
- * The HandAndHand function dereferences the handle aHndl. You must
- * call the HLock procedure to lock the block before calling
- * HandAndHand. Afterward, you can call the HUnlock procedure to
- * unlock it. Alternatively, you can save the block's original state
- * by calling the HGetState function, lock the block by calling
- * HLock, and then restore the original settings by calling
- * HSetState.
- *
- * Mac OS X threading:
- * Thread safe since version 10.3
- *
- * Parameters:
- *
- * hand1:
- * A handle to the first relocatable block, whose contents do not
- * change but are concatenated to the end of the second
- * relocatable block.
- *
- * hand2:
- * A handle to the second relocatable block, whose size the Memory
- * Manager expands so that it can concatenate the information from
- * aHndl to the end of the contents of this block.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function HandAndHand( hand1: Handle; hand2: Handle ): OSErr; external name '_HandAndHand';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
- {
- * PtrAndHand()
- *
- * Summary:
- * Concatenates part or all of a memory block to the end of a
- * relocatable block.
- *
- * Discussion:
- * The PtrAndHand function takes the number of bytes specified by
- * the size parameter, beginning at the location specified by ptr1,
- * and concatenates them onto the end of the relocatable block to
- * which hand2 is a handle. The contents of the source block remain
- * unchanged.
- *
- * Mac OS X threading:
- * Thread safe since version 10.3
- *
- * Parameters:
- *
- * ptr1:
- * a pointer to the beginning of the data that the Memory Manager
- * is to concatenate onto the end of the relocatable block.
- *
- * hand2:
- * a handle to the relocatable block, whose size the Memory
- * Manager expands so that it can concatenate the information from
- * ptr1 onto the end of this block.
- *
- * size:
- * the number of bytes of the block referenced by ptr1 to copy.
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function PtrAndHand( ptr1: {const} UnivPtr; hand2: Handle; size: SIGNEDLONG ): OSErr; external name '_PtrAndHand';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
- {$ifc not TARGET_CPU_64}
- {
- * MoreMasters() *** DEPRECATED ***
- *
- * Discussion:
- * On Mac OS X and later, master pointers do not need to be
- * pre-allocated.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- procedure MoreMasters; external name '_MoreMasters';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
- {
- * MoreMasterPointers() *** DEPRECATED ***
- *
- * Discussion:
- * On Mac OS X and later, master pointers do not need to be
- * pre-allocated.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inCount:
- * the number of master pointers to preallocate
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: not available
- }
- procedure MoreMasterPointers( inCount: UInt32 ); external name '_MoreMasterPointers';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
- { Temporary Memory routines renamed, but obsolete, in System 7.0 and later. }
- {
- * TempHLock() *** DEPRECATED ***
- *
- * Discussion:
- * This function has been deprecated for many years; replace it with
- * HLock()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- procedure TempHLock( h: Handle; var resultCode: OSErr ); external name '_TempHLock';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
- {
- * TempHUnlock() *** DEPRECATED ***
- *
- * Discussion:
- * This function has been deprecated for many years; replace it with
- * HUnlock()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- procedure TempHUnlock( h: Handle; var resultCode: OSErr ); external name '_TempHUnlock';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
- {
- * TempDisposeHandle() *** DEPRECATED ***
- *
- * Discussion:
- * This function has been deprecated for many years; replace it with
- * DisposeHandle()
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- procedure TempDisposeHandle( h: Handle; var resultCode: OSErr ); external name '_TempDisposeHandle';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_5, __IPHONE_NA, __IPHONE_NA) *)
- {
- * TempTopMem() *** DEPRECATED ***
- *
- * Discussion:
- * Mac OS X and later does not have a seperate temporary memory
- * heap. This function returns NULL.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function TempTopMem: Ptr; external name '_TempTopMem';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
- {
- * HoldMemory() *** DEPRECATED ***
- *
- * Deprecated:
- * Mac OS X has never supported HoldMemory. The functions in
- * ./sys/mman.h may be useful for replacing usage of these
- * functions, although Mac OS X does not allow the same level of
- * control over whether pages are held in memory or resident as Mac
- * OS 9.x did.
- * If you define a macro __MAC_OS_X_MEMORY_MANAGER_CLEAN__ in your
- * sources before you include MacMemory.h, then any calls to
- * HoldMemory() in your program will essentially be removed.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
- * CarbonLib: in CarbonLib 1.1 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function HoldMemory( address: UnivPtr; count: UNSIGNEDLONG ): OSErr; external name '_HoldMemory';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
- {
- * UnholdMemory() *** DEPRECATED ***
- *
- * Deprecated:
- * Mac OS X has never supported MakeMemoryResident. See the comment
- * above UnholdMemory for more information.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
- * CarbonLib: in CarbonLib 1.1 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function UnholdMemory( address: UnivPtr; count: UNSIGNEDLONG ): OSErr; external name '_UnholdMemory';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
- {
- * MakeMemoryResident() *** DEPRECATED ***
- *
- * Deprecated:
- * Mac OS X has never supported MakeMemoryResident. See the comment
- * above UnholdMemory for more information.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * address:
- * the address to make resident
- *
- * count:
- * the count of pages to make make resident
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
- * CarbonLib: in CarbonLib 1.0.2 and later
- * Non-Carbon CFM: in InterfaceLib 8.5 and later
- }
- function MakeMemoryResident( address: UnivPtr; count: UNSIGNEDLONG ): OSErr; external name '_MakeMemoryResident';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
- {
- * ReleaseMemoryData() *** DEPRECATED ***
- *
- * Deprecated:
- * Mac OS X has never supported MakeMemoryResident. See the comment
- * above UnholdMemory for more information.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * address:
- * the address to make release
- *
- * count:
- * the count of pages to make make release
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
- * CarbonLib: in CarbonLib 1.0.2 and later
- * Non-Carbon CFM: in InterfaceLib 8.5 and later
- }
- function ReleaseMemoryData( address: UnivPtr; count: UNSIGNEDLONG ): OSErr; external name '_ReleaseMemoryData';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
- {
- * MakeMemoryNonResident() *** DEPRECATED ***
- *
- * Deprecated:
- * Mac OS X has never supported MakeMemoryResident. See the comment
- * above UnholdMemory for more information.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * address:
- * the address to make non-resident
- *
- * count:
- * the count of pages to make make non-resident
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
- * CarbonLib: in CarbonLib 1.0.2 and later
- * Non-Carbon CFM: in InterfaceLib 8.5 and later
- }
- function MakeMemoryNonResident( address: UnivPtr; count: UNSIGNEDLONG ): OSErr; external name '_MakeMemoryNonResident';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
- {
- * FlushMemory() *** DEPRECATED ***
- *
- * Deprecated:
- * Mac OS X has never supported MakeMemoryResident. See the comment
- * above UnholdMemory for more information.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * address:
- * the address to flush
- *
- * count:
- * the count of pages to make flush
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
- * CarbonLib: in CarbonLib 1.0.2 and later
- * Non-Carbon CFM: in InterfaceLib 8.5 and later
- }
- function FlushMemory( address: UnivPtr; count: UNSIGNEDLONG ): OSErr; external name '_FlushMemory';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
- {
- * GZSaveHnd() *** DEPRECATED ***
- *
- * Summary:
- * This function is deprecated on Mac OS X and always returns NULL.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function GZSaveHnd: Handle; external name '_GZSaveHnd';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
- {
- * TopMem() *** DEPRECATED ***
- *
- * Summary:
- * This function is deprecated on Mac OS X and always returns NULL.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function TopMem: Ptr; external name '_TopMem';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
- {
- * ReserveMem() *** DEPRECATED ***
- *
- * Summary:
- * This function is deprecated on Mac OS X.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- procedure ReserveMem( cbNeeded: Size ); external name '_ReserveMem';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
- {
- * PurgeSpace() *** DEPRECATED ***
- *
- * Summary:
- * This function is deprecated on Mac OS X.
- *
- * Discussion:
- * On Mac OS X and later, heaps are never purged and therefore
- * PurgeSpace will always return a large value for both the total
- * space available and the largest block available. You can assume
- * that any reasonable memory allocation will succeed.
- *
- * If you define a macro __MAC_OS_X_MEMORY_MANAGER_CLEAN__ in your
- * sources before you include MacMemory.h, then any calls to
- * PurgeSpace() in your program will essentially be removed.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- procedure PurgeSpace( var total: SIGNEDLONG; var contig: SIGNEDLONG ); external name '_PurgeSpace';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
- {
- * PurgeSpaceTotal() *** DEPRECATED ***
- *
- * Summary:
- * This function is deprecated on Mac OS X.
- *
- * Discussion:
- * On Mac OS X and later, heaps are never purged and therefore
- * PurgeSpaceTotal will always return a large value. You can assume
- * that any reasonable memory allocation will succeed.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 8.5 and later
- }
- function PurgeSpaceTotal: SIGNEDLONG; external name '_PurgeSpaceTotal';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
- {
- * PurgeSpaceContiguous() *** DEPRECATED ***
- *
- * Summary:
- * This function is deprecated on Mac OS X.
- *
- * Discussion:
- * On Mac OS X and later, heaps are never purged and therefore
- * PurgeSpaceContiguous will always return a large value. You can
- * assume that any reasonable memory allocation will succeed.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 8.5 and later
- }
- function PurgeSpaceContiguous: SIGNEDLONG; external name '_PurgeSpaceContiguous';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
- { Carbon routines to aid in debugging. }
- {
- * CheckAllHeaps() *** DEPRECATED ***
- *
- * Summary:
- * Check all known heaps for validity. Deprecated on Mac OS X,
- * since there really aren't heaps. Use IsHeapValid() if you really
- * want this functionality.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: not available
- }
- function CheckAllHeaps: Boolean; external name '_CheckAllHeaps';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
- {$endc} {not TARGET_CPU_64}
- {
- * IsHeapValid()
- *
- * Summary:
- * Check if the heap is valid.
- *
- * Mac OS X threading:
- * Thread safe since version 10.4
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: not available
- }
- function IsHeapValid: Boolean; external name '_IsHeapValid';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
- { It is invalid to pass a NULL or an empty Handle to IsHandleValid }
- {
- * IsHandleValid()
- *
- * Mac OS X threading:
- * Thread safe since version 10.3
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: not available
- }
- function IsHandleValid( h: Handle ): Boolean; external name '_IsHandleValid';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
- { It is invalid to pass a NULL Pointer to IsPointerValid }
- {
- * IsPointerValid()
- *
- * Mac OS X threading:
- * Thread safe since version 10.3
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: not available
- }
- function IsPointerValid( p: Ptr ): Boolean; external name '_IsPointerValid';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
- {$ifc not TARGET_CPU_64}
- {
- * LMGetSysZone() *** DEPRECATED ***
- *
- * Summary:
- * This function is deprecated on Mac OS X.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function LMGetSysZone: THz; external name '_LMGetSysZone';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
- {
- * LMSetSysZone() *** DEPRECATED ***
- *
- * Summary:
- * This function is deprecated on Mac OS X.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- procedure LMSetSysZone( value: THz ); external name '_LMSetSysZone';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
- {
- * LMGetApplZone() *** DEPRECATED ***
- *
- * Summary:
- * This function is deprecated on Mac OS X.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- function LMGetApplZone: THz; external name '_LMGetApplZone';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
- {
- * LMSetApplZone() *** DEPRECATED ***
- *
- * Summary:
- * This function is deprecated on Mac OS X.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
- * CarbonLib: in CarbonLib 1.0 and later
- * Non-Carbon CFM: in InterfaceLib 7.1 and later
- }
- procedure LMSetApplZone( value: THz ); external name '_LMSetApplZone';
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
- {$endc} {not TARGET_CPU_64}
- {$endc} {TARGET_OS_MAC}
- {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
- end.
- {$endc} {not MACOSALLINCLUDE}
|