Re: request for feature
- Posted by jimcbrown (admin) Sep 26, 2012
- 1272 views
Can tasks.e use some fast database methods to page out unscheduled tasks to the harddrive? The goal to free up memory and task pointers.
I wish to cycle thru lists of functions (procedures) to do similar, i guess, to how a cron job scheduler would work, and each task does things in the global application, then when it's done enough, and enough times, it can be paged out until needed again. The problem is the task system can run out of memory and pointers, if i leave this running, with intent for it to keep on for a year, it could crash in 11 months simply by filling all memory with task overhead, and i will have wasted all that time.
This ability might also please those who wanted dynamic includes: just load the code up as a procedure with it's local variables intact, and schedule it.
Another good part of this: altho the task reloaded would not be available as ordinary Eu code to be called as a procedure, it would be great to be able to call it as two different tasks. So if have an app, and in my app i have procedure x(), and i call it as a task, then i save it thru the task_unload(), i can later task_load() it twice if i like. This means, of course, the benefit of recycling the task ID gets a new ID each time a task is _loaded.
eukat
Why do you care about it. The OS have a virtual memory paging system and page in and out to disk as needed. Application don't have to care about it. In 32 bits Windows any application as almost 2Go of virtual memory space to its use. If more is needed there is 64 bits OS nowadays.
Jacques
Because i have 15 gigabytes of data in one directory and a 32 bit OS. And i don't want to pay to use 64 bit OS, or buy a 64 bit computer, or load all 15 Gigabytes into memory.
eukat
Just so we're clear, this is 15 gigabytes of Euphoria source code, right?
23:09:50 < CoJaBo> katsmeow-afk: I'm not sure I understand how one can get 15GB of Eu code? 23:10:27 < CoJaBo> Data, sure.. but code? ... 23:19:46 < CoJaBo> I don't understand the problem; I can't even begin to imagine a solution 23:19:56 < CoJaBo> How does one get 15GB of source? ... 23:23:51 < CoJaBo> I'm not misreading 15 gigs of source code?
This can be confusing because source is both code and data simultaneously. Even more confusingly, one can take obviously non-code and non-source data and embed it into a source code file of a program or library (e.g. by writing the output of "constant somedata="sprint() to a .e file).