[vbox-dev] VirtualBox 5.x IDisplaySourceBitmap life cycle

Rudolfs Bundulis rudolfs.bundulis at gmail.com
Wed Feb 3 11:19:40 UTC 2016


Hi Vitali,

Thanks for the clarifications. I was mostly worried about an access violation. If the pointer is valid then I can just make some invalidation mechanism that will drop all pending updates after a format change and skip any frames that were being encoded at the moment of notifiaction if such a race occurs. I was only worried that the pointer may become invalid. Thank you very much:)

-----Original Message-----
From: "Vitali Pelenjow" <Vitali.Pelenjow at oracle.com>
Sent: ‎03/‎02/‎2016 12:07
To: "Rūdolfs Bundulis" <rudolfs.bundulis at gmail.com>; "vbox-dev at virtualbox.org" <vbox-dev at virtualbox.org>
Subject: Re: [vbox-dev] VirtualBox 5.x IDisplaySourceBitmap life cycle

Hi,

the VRAM pointer will be valid, because it points to the memory 
allocated for the VM graphics device.
The memory is deallocated when VM shuts down.

However the memory content might change of course.

Vitali

On 2/3/2016 11:01 AM, Rūdolfs Bundulis wrote:
> >  Yes, it is an automatically generated file, a COM wrapper based on 
> the IDL description. It does make navigating the source code a bit 
> harder.
> Ok thanks for clearing this out.
>
> I managed  to find the place where the memory is actually handled 
> - DisplaySourceBitmap::initSourceBitmap() in 
> DisplaySourceBitmapImpl.cpp. It seems that in case the VRAM is not 
> used my assumption is true and the IDisplaySourceBitmap frees the 
> allocated memory in its dtor so as long as I keep a reference I'm 
> safe. But in case VRAM is used, what happens if a 
> IDisplaySourceBitmap instance is still alive when the resolution 
> changes - does the contained pointer simply become invalid?
>
>
>
>
> _______________________________________________
> vbox-dev mailing list
> vbox-dev at virtualbox.org
> https://www.virtualbox.org/mailman/listinfo/vbox-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.virtualbox.org/pipermail/vbox-dev/attachments/20160203/90905c1c/attachment.html 


More information about the vbox-dev mailing list