[Vm-dev] Re: Temp directory for Squeak

Bert Freudenberg bert at freudenbergs.de
Sat Jun 12 19:04:09 UTC 2010


On 12.06.2010, at 20:50, K. K. Subramaniam wrote:

> On Saturday 12 Jun 2010 11:01:41 pm Bert Freudenberg wrote:
>> On 12.06.2010, at 17:20, K. K. Subramaniam wrote:
>>> Hi,
>>> 
>>> I propose that we add one more user directory to squeak - a volatile
>>> writable directory that can used for temporary files. On most hosts,
>>> temporaryDirectory will be mapped to RAM and not hard disk or flash
>>> memory. RAM has reduced I/O latency, power drain and wear/tear.
>> 
>> Would the VM be responsible for deleting that directory when it exits?
> Yes. To reclaim tmpfs space. In case of a crash, the host will reclaim the 
> same on reboot.
> 
>>> mktemp family of calls can be used to create it (on first access)
>>> portably in both plugin code and in launch scripts.
>> 
>> What would mktemp have to do with this? You need to pass it the location,
>> it just creates a unique file.
> mktemp refers to a family of calls. mkdtemp creates a directory. mktemp -d 
> creates the same in a script. 

You still need to give a path to mkdtemp. Which will be different for each platform.

>> At least on the OLPC XO, the RAM-backed tmp folder may be as small as 1 MB:
>> 
>> http://wiki.sugarlabs.org/go/Development_Team/Low-level_Activity_API#Writab
>> le_Directories
>> 
>> That does not seem sufficient for "large remote files" or video clips. Or
>> even for larger Etoys projects, for that matter.
> mkdtemp takes a path. For low-RAM XO models, one could mount/symlink flash 
> onto, say, /tmp/squeak/ and use it as a temporary directory for Squeak. Of 
> course, the startup scripts will have to wipe /tmp/squeak/ to take care of VM 
> crashes.

So that's nothing better, just more complicated, than what we do now (use the activity instance dir for squeaklets).

Note I'm not opposed to your proposal, I just do not see any urgent need for it.

- Bert -



More information about the Vm-dev mailing list