|
From: Prometheus P. <pro...@ho...> - 2006-05-11 12:11:52
|
<html><div style='background-color:'><DIV class=RTE> <P><FONT style="FONT-SIZE: 11px; FONT-FAMILY: tahoma,sans-serif">><BR>>There are a few problems with this aproach:<BR>>1) You don't have a way to cleanup the memory<BR>yeah, i know, that was my secondary objective<BR>firstly i only wanted to, hmm, get something to work<BR><BR>>2) When do first initialise the memory? When do you do memset?<BR>if the memory doesn't exist (i use ftok(); to create the key) i do memset (so it's only done right after creating)<BR></FONT><FONT style="FONT-SIZE: 11px; FONT-FAMILY: tahoma,sans-serif"><BR>>3) You don't know where that segment gets attached. The restore code for<BR>>memory doesn't fixup pointers!<BR>aaarrgghh, good point<BR><BR>>The best way to implement such a feature would be 'disabling' shared<BR>>memory and only using file cache. This would give you a bit of overhead<BR>>but not much because you will have to do the 'fixup' always when loading<BR>>files cross-process.<BR><BR>seems a lot of work<BR>if i have time i'll give it a try</FONT></P> <P>thx@ll</P></DIV></div></html> |