Avoid assert printout upon fallback of memory allocation
If the memory was requested from VRAM area but finally allocated from DEVRAM, set memory space variable for correct verification of allocated pointer Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
parent
54a719e14f
commit
decf2c9035
@ -4077,8 +4077,11 @@ void *QxlDevice::AllocMem(UINT32 mspace_type, size_t size, BOOL force)
|
|||||||
FlushReleaseRing();
|
FlushReleaseRing();
|
||||||
|
|
||||||
ptr = mspace_malloc(m_MSInfo[mspace_type]._mspace, size);
|
ptr = mspace_malloc(m_MSInfo[mspace_type]._mspace, size);
|
||||||
if (!ptr && mspace_type == MSPACE_TYPE_VRAM)
|
if (!ptr && mspace_type == MSPACE_TYPE_VRAM &&
|
||||||
ptr = mspace_malloc(m_MSInfo[MSPACE_TYPE_DEVRAM]._mspace, size);
|
(ptr = mspace_malloc(m_MSInfo[MSPACE_TYPE_DEVRAM]._mspace, size))) {
|
||||||
|
/* for proper address check at the end of the procedure */
|
||||||
|
mspace_type = MSPACE_TYPE_DEVRAM;
|
||||||
|
}
|
||||||
if (ptr) {
|
if (ptr) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user