[Vm-dev] [Fwd: Image file loading]
Andreas Raab
andreas.raab at gmx.de
Wed Jan 20 20:19:29 UTC 2010
Igor Stasenko wrote:
> Well, i mainly meant some kind of a network startup scenario, when
> image data is feeded directly from socket.
> Platform code could pass the socket to interpreter (as void* object),
> and then wait for allocation & read requests which will follow.
> And so, you don't have to use some intermediate memory buffer to
> preload an image and only then pass
> it to interpreter entry point.
But Igor, unless you are *trying* to be obscure why would your network
protocol (that the support code needs to implement anyway) not include
any information about how many bytes are to come? See my previous
example about http - you could trivially launch an image by giving it an
HTTP url; download the image into memory and launch the interpreter
without having to involve the interpreter at all.
This is *necessarily* true for *all* I/O operations that load an image.
There simply is no point to pass a void* to the interpreter only have
it passed back as a void* to the support code. If you're doing that, why
not load the thing right away instead of unnecessarily passing pointers
back and forth?
Cheers,
- Andreas
More information about the Vm-dev
mailing list