[Vm-dev] [Fwd: Image file loading]

Igor Stasenko siguctua at gmail.com
Wed Jan 20 21:28:56 UTC 2010


2010/1/20 Andreas Raab <andreas.raab at gmx.de>:
>
> 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?
>
because of image header parsing logic, which ,as you said should stay
in interpreter.
Why one should wait , downloading the whole image, only after that to
discover that image format is not compatible
with interpreter, or not enough memory etc etc?


> Cheers,
>  - Andreas
>



-- 
Best regards,
Igor Stasenko AKA sig.


More information about the Vm-dev mailing list