I took the list of VM APIs at https://isqueak.org/PlatformVMAPI and created a regex that searches for definitions of them:

\w+\s+\*?\s*\b(ioExit|ioDisablePowerManager|ioMicroMSecs|ioMSecs|ioLowResMSecs|ioRelinquishProcessorForMicroseconds|dir_Lookup|dir_Create|dir_Delete|dir_Delimitor|dir_SetMacFileTypeAndCreator|dir_GetMacFileTypeAndCreator|dir_PathToWorkingDir|sqFTruncate|getAttributeIntoLength|attributeSize|sqGetFilenameFromString|ioScreenSize|ioScreenDepth|ioHasDisplayDepth|ioForceDisplayUpdate|display_ioShowDisplay|ioProcessEvents|ioSetInputSemaphore|ioGetNextEvent|ioBeep|sqAllocateMemory|sqGrowMemoryBy|sqShrinkMemoryBy|sqMemoryExtraBytesLeft|reserveExtraCHeapBytes|imageName|getImageName|imageNamePutLength|imageNameGetLength|imageNameSize|vmPathSize|vmPathGetLength|sqImageFileOpen|insufficientMemorySpecifiedError|insufficientMemoryAvailableError|unableToReadImageError|browserPluginReturnIfNeeded|browserPluginInitialiseIfNeeded|ioFormPrint|ioSetFullScreen|ioSeconds|ioSetCursor|ioSetCursorWithMask|ioSetCursorARGB|ioSetDisplayMode|ioGetButtonState|ioCanRenameImage|secCanGetFileTypeOfSize|secHasSocketAccess|clearProfile|clipboardSize|clipboardReadIntoAt|clipboardWriteFromAt\n|ioLoadModule|ioFindExternalFunctionIn|ioFreeModule)\b

Here are the locations that define these methods in *.m files. I guess there are more methods that are not in the list.

A few questions remain for me:

  1. Is there any way to ensure a complete list of all callouts that need to be added to the autorelease pool?
  2. How does a general fix have to look? Wrap all definitions with an auto-release block, or is there a global machinery that can be hooked into?
  3. Regarding ARC vs. non-ARC: Does @autoreleasepool even exist in non-ARC? If no, then there is no point of using AUTORELEASEOBJ() etc. If yes, how to audit the code for missing AUTORELEASEOBJ() calls?

platforms/iOS/vm/Common/Classes/sqSqueakAttributesAPI.m#L49 attributeSize
platforms/iOS/vm/Common/Classes/sqSqueakAttributesAPI.m#L59 getAttributeIntoLength
platforms/iOS/vm/Common/Classes/sqSqueakCursorAPI.m#L46 ioSetCursor
platforms/iOS/vm/Common/Classes/sqSqueakCursorAPI.m#L54 ioSetCursorWithMask
platforms/iOS/vm/Common/Classes/sqSqueakCursorAPI.m#L62 ioSetCursorARGB
platforms/iOS/vm/Common/Classes/sqSqueakEventsAPI.m#L96 ioProcessEvents
platforms/iOS/vm/Common/Classes/sqSqueakEventsAPI.m#L125 ioSetInputSemaphore
platforms/iOS/vm/Common/Classes/sqSqueakEventsAPI.m#L132 ioGetNextEvent
platforms/iOS/vm/Common/Classes/sqSqueakFileDirectoryAPI.m#L53 dir_GetMacFileTypeAndCreator
platforms/iOS/vm/Common/Classes/sqSqueakFileDirectoryAPI.m#L68 dir_SetMacFileTypeAndCreator
platforms/iOS/vm/Common/Classes/sqSqueakFileDirectoryAPI.m#L84 dir_Delimitor
platforms/iOS/vm/Common/Classes/sqSqueakFileDirectoryAPI.m#L94 dir_Lookup
platforms/iOS/vm/Common/Classes/sqSqueakFileDirectoryAPI.m#L166 dir_Create
platforms/iOS/vm/Common/Classes/sqSqueakFileDirectoryAPI.m#L176 dir_Delete
platforms/iOS/vm/Common/Classes/sqSqueakFileDirectoryAPI.m#L202 sqGetFilenameFromString
platforms/iOS/vm/Common/Classes/sqSqueakFileDirectoryAPI.m#L224 dir_PathToWorkingDir
platforms/iOS/vm/Common/Classes/sqSqueakMainApp.m#L393 ioExit
platforms/iOS/vm/Common/Classes/sqSqueakMainApp.m#L407 ioDisablePowerManager
platforms/iOS/vm/Common/Classes/sqSqueakScreenAPI.m#L68 ioScreenSize
platforms/iOS/vm/Common/Classes/sqSqueakScreenAPI.m#L74 ioScreenDepth
platforms/iOS/vm/Common/Classes/sqSqueakScreenAPI.m#L79 ioHasDisplayDepth
platforms/iOS/vm/Common/Classes/sqSqueakScreenAPI.m#L85 ioForceDisplayUpdate
platforms/iOS/vm/Common/Classes/sqSqueakScreenAPI.m#L91 ioSetFullScreen
platforms/iOS/vm/Common/Classes/sqSqueakSoundAPI.m#L45 ioBeep
platforms/iOS/vm/Common/Classes/sqSqueakVmAndImagePathAPI.m#L49 getImageName
platforms/iOS/vm/Common/Classes/sqSqueakVmAndImagePathAPI.m#L53 imageNameSize
platforms/iOS/vm/Common/Classes/sqSqueakVmAndImagePathAPI.m#L57 imageNameGetLength
platforms/iOS/vm/Common/Classes/sqSqueakVmAndImagePathAPI.m#L62 imageNamePutLength
platforms/iOS/vm/Common/Classes/sqSqueakVmAndImagePathAPI.m#L74 vmPathSize
platforms/iOS/vm/Common/Classes/sqSqueakVmAndImagePathAPI.m#L78 vmPathGetLength
platforms/iOS/vm/iPhone/sqMacUnixExternalPrims.m#L125 ioLoadModule
platforms/iOS/vm/iPhone/sqMacUnixExternalPrims.m#L157 ioFindExternalFunctionIn
platforms/iOS/vm/iPhone/sqMacUnixExternalPrims.m#L181 ioFreeModule
platforms/iOS/vm/iPhone/Classes/sqSqueakIPhoneClipboardAPI.m#L17 clipboardSize
platforms/iOS/vm/iPhone/Classes/sqSqueakIPhoneClipboardAPI.m#L24 clipboardReadIntoAt
platforms/iOS/vm/OSX/sqMacUnixExternalPrims.m#L217 ioLoadModule
platforms/iOS/vm/OSX/sqMacUnixExternalPrims.m#L361 ioFindExternalFunctionIn
platforms/iOS/vm/OSX/sqMacUnixExternalPrims.m#L401 ioFreeModule
platforms/iOS/vm/OSX/sqSqueakOSXClipboardAPI.m#L47 clipboardSize
platforms/iOS/vm/OSX/sqSqueakOSXClipboardAPI.m#L54 clipboardReadIntoAt
platforms/Mac%20OS/vm/NSCursorWrappers.m#L62 ioSetCursorARGB


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.