<i>load library (dll) from zipfs-library causes a leak in temporary folder</i> status still Open with 3 other changes
by
.
D 2024-11-27T07:40:58.414
J icomment OK,\sAshok.\sLet\sme\sclarify\s(and\slet\sus\sleave\sWine\sand\sbuild-time\sout\sfor\snow).\r\n\r\n*\sWhen\sdoes\smemory\sloading\soccur?\r\n\r\nA\sshared\sobject\sshall\sbe\sTcl_LoadFile()'d\sand\sis\snot\sin\sthe\snative\sfilesystem.\r\nOtherwise\sthe\snormal\splatform\sspecific\sloader\sis\sused.\r\n\r\n*\sWhy\sis\smemory\sloading\sattractive?\r\n\r\nBecause\sit\srequires\snearly\sonly\sRAM,\snot\smuch\selse.\sRAM\sis\scheap\snowadays.\r\nAnd\sthere\sis\splenty,\susually.\r\n\r\n*\sWhich\splatforms\sprovide\smemory\sloading\sOOTB?\r\n\r\nMacOS.\r\n\r\n*\sWhich\splatforms\sallow\sfor\ssafe\simplementation\sof\sthe\sMacOS\sfunctionality?\r\n\r\nPOSIX\swhen\ssupporting\sdlopen(),\sshm_open(),\sand\smmap(),\sor\sLinux\s>=\s3.17\r\nwith\sdlopen()\sand\smemfd_create().\sIn\sboth\scases\sthe\sshared\sobject\sis\r\ncopied\sinto\sa\snamed\sshared\smemory\swhich\sthen\sis\sdlopen()'ed.\sOn\sFreeBSD\r\nthere's\sfdlopen()\swhich\sallows\sto\suse\sthe\sopen\sshared\smemory\sinstead\sof\r\nthe\sname\sof\sthe\sshared\smemory,\seven.\r\n\r\n*\sWhich\splatforms\sallow\sfor\simmediate\sdeletion\sof\sa\sfile\sin\snative\r\n\s\sfilesystem\safter\sit\shas\sbeen\sdlopen()'d?\r\n\r\nPOSIX.\sWindows\smost\slikely\sonly\sin\svery\sspecific\scontexts,\si.e.\snormally\snot.\r\nThat\sseems\sto\sbe\sthe\smain\sreason\sto\shave\sa\stemporary\sdirectory\sfor\sDLL's\r\nloaded\son\sWindows.\r\n\r\n*\sWhy\sdo\sI\sprefer\sMemoryModule\son\sWindows?\r\n\r\nSee\sabove,\sfor\ssymmetry.\sAnd\sRAM\sis\scheap\son\sWindows,\stoo.\r\n\r\n*\sWhat\sare\salternatives?\r\n\r\nIf\sit\swould\sbe\spossible\sto\shave\sa\scomparable\strickery\susing\snamed\sshared\r\nmemories\splus\sLoadLibrary()\son\sthem\son\sWindows,\sthat\swould\sbe\seven\sbetter.\r\n\r\n\r\nFurther\scomments:\r\n\r\nI\ssee\syour\spoint:\speople\swhich\screate\sa\shuge\smulti\sgigabyte\sC++\sAI\sDLL\r\nblob\swhich\sthey\swant\sto\sdeliver\sas\spart\sof\sa\sZIPFS\sbundled\stclsh\sor\r\nwish\sapp.\sFor\snow\sthey\shave\salready\sto\swait\sfor\sZIP64\ssupport.\sOTOH,\r\nas\slong\sas\swe\sthoroughly\sdocument\sthe\slimitations\sof\smemory\sloading\sfor\r\nthe\sWindows\splatform,\sthey\swill\shave\sto\sunderstand\sthat\swrapping\sin\sthis\r\ncase\sis\snot\ssupported.\sAnd\sthat\sa\spersistent\sinstall\smechanism\sis\sthe\r\nbetter\ssolution\sin\sthis\scase\sanyway,\ssince\sload\stime\sof\sthat\sblob\sat\r\nstartup\shas\sin\sany\simplementation\sof\smemory\sloading\sa\snegative\simpact\r\non\suser\sexperience.
J login chw
J mimetype text/x-fossil-plain
K a8e4f76ce498ad648134e0b6867c359949055388
U chw
Z 56a22bdfd8698507179d8371da1e8b35