On Fri, May 28, 2004 at 11:38:55AM +0200, Leopold Toetsch wrote: > I didn't get much comments for my proposal WRT IO changes. So I'll > sumarize my next planned steps:
I'm as guilty as everyone else here > * use Parrot_stat_info_intval(..., STAT_FILESIZE) in > embed.c:Parrot_readbc() to obtain the PBC file size [1] > * convert all IO Read layer functions to return a STRING* [2] > * toss PIO_read() interface, PIO_reads() is used > * fix the C<readline> opcode, which is actually unusable now for reading > files containing more then a few lines. > > The returned string gets malloc(3)ed. > PObj_external_FLAG|PObj_sysmem_FLAG is set, so that the memory gets > freed during DOD. I can't find your earlier proposals (which suggests that I've read and deleted them), so I may be missing something from there. Why does the memory need to be malloc()ed, rather than grabbed from something parrot can pass onwards through PMCs? Is the intent to keep the IO system isolated from most of parrot, so that it still works during VM setup/teardown? Am I guilty of premature optimisation here? Nicholas Clark