Thank you Steve.
> Presumably you mean "section_cancel" rather than "syscancel"? In any case,
> you should never have to do this. This sounds an alarm bell to me. I
> wonder what effect you are trying to achieve with this>
Simply trying to make room!
> Sorry - I've never used the PWM.
I wish I hadn't!
> If garbage collection is too infrequent the garbage collector *will*
> attempt to give memory back to UNIX. If garbage collections start happening
> frequently then it will grow the process.
> Furthermore, the POPLOG garbage collector will, by default, use a
> 2-space copying collector. This briefly "doubles" the size of the
> process. You can (and probably should) switch the default collector
> to the non-copying version. [Just set pop_gc_copy to false.]
Thanks. I'll cut out the garbage collections. I had been advised that these were poplog's means to deallocate memory.
> Yet another approach would be to make extensive use of memoisation. This
> is a typical solution in (advanced) image processing and is naturally
> done using POPLOG temporary properties.
I'm afraid I have had to teach myself advanced image processing, and I have never come across the term "memoisation"! I will explain how I would arrange the memory for this work if I was using C and Assembly.
I would have allocated blocks of ram in a contigious segment, one for the original image, and one or more using individual bit-planes on the byte to hold the requisite masks, etc. I would then assign a pointer based at the start of the first image, and one or more offsets to the masks and/or results of filtering. This would give a dramatic decrease in access time, and the whole block could be easily deallocated. Is this what "memoisation" means?
What are "poplog temporary properties" ?
I haven't a clue as to how one might achieve memory allocation or deallocation in poplog, or how one might assign a pointer to such memory and utilize simple pointer arithmatic in poplog. I also have no idea how one might include C programs into poplog, not having 6 months to spend searching through help and reference files.
I am also extememly reluctant to try using low-level code in poplog, because I fear it will only open another nest of problems in having to familiarise myself with the insides of poplog.
Thanks for the useful tips on sectioncancel and sysgarbage.
Helen.
|