<i> Memory usage degradations after enabling thread in TCL</i> status still Open with 3 other changes
by
.
D 2021-04-08T10:50:25.549
J icomment What\sare\syou\scalling\smemory\sdegradation?\r\n\r\n1.\sIf\syou\srather\smean\sthat\sfreed\smemory\sblocks\sare\snot\sreleased\sto\ssystem\sback,\sthen\sit\sis\sindeed\scorrect\swith\sthreaded-alloc,\sbut\sit\sis\sintended\sbehavior\s-\sthey\swill\sbe\sput\sinto\scommon\sthread\spool,\sso\sare\sreusable\sfor\sfurther\sthreads.\r\n\r\nThe\s"solution"\sis\shere\sonly\sto\sbuild\stcl\swith\ssome\scustom\smemory\smanager\s(or\sredefine\sTcl_Alloc,\sTcl_Free\setc\sas\ssys-calls\salloc,\sfree\setc).\r\n\r\n2.\sIf\syou\smean\seither\scertain\smemory\sfragmentation\s(e.\sg.\slike\sdescribed\shere\s[http://paste.tclers.tk/5260|http://paste.tclers.tk/5260]),\sthen\sit\sis\salso\sknown\sissue\sand\swork\sis\sin\sprogress\s(I'll\stry\sto\spresent\snew\sthreaded-alloc\smemory\smanager\ssoon).\r\n\r\nPossible\s"solution"\sfor\sthat\sat\sthe\smoment\sis\sthe\ssame\sas\sabove.\r\n\r\n3.\sAnd\slast\sbut\snot\sleast,\ssome\sof\syour\shandling\scould\sbe\sprobably\sthread\sunsafe,\sso\ssimply\sleaking\son\smemory\sif\ssomething\sused\smulti-threaded.\sFor\sinstance,\syou\scannot\sshare\stcl-objects\sacross\sthreads\s(it\sis\sonly\sallowed\sto\ssupply\ssingle\sreference\sof\sobject\sfrom\sone\sthread\sto\sanother,\sbut\snot\sa\scommon\sshared\susage\sin\sboth,\ssee\sTcl_DuplicateObj),\slet\salone\sthe\stcl-interpreter\sor\ssome\sother\smain\sTcls\sinstances,\swhich\smust\sbe\salso\sdefinitely\sowned\sby\sthe\ssingle\sthread\sonly.
J login sebres
J mimetype text/x-fossil-wiki
K 5ee1a650b7b537514162f3d9ce01317298ed45f5
U sebres
Z c64b3938b29cd6c9eec602175d334ca0