diff options
| author | David Spruill <[email protected]> | 2026-07-20 17:32:08 -0400 |
|---|---|---|
| committer | David Spruill <[email protected]> | 2026-07-20 17:32:08 -0400 |
| commit | 612387cd2ed425dc873b269f2e945633b8cd7119 (patch) | |
| tree | 2d28d7b64c39e246c38389c118e72bdb2f249d2e | |
| parent | 6b4e5cc14c3a45aa5c51badb6bfe4886af30ad32 (diff) | |
fix memory allocation
| -rw-r--r-- | video/KMDOD/bdd_ddi.cxx | 3 | ||||
| -rw-r--r-- | video/KMDOD/blthw.cxx | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/video/KMDOD/bdd_ddi.cxx b/video/KMDOD/bdd_ddi.cxx index 924758c5..cdbe8594 100644 --- a/video/KMDOD/bdd_ddi.cxx +++ b/video/KMDOD/bdd_ddi.cxx @@ -103,7 +103,8 @@ BddDdiAddDevice( } *ppDeviceContext = NULL; - BASIC_DISPLAY_DRIVER* pBDD = new(POOL_FLAG_NON_PAGED) BASIC_DISPLAY_DRIVER(pPhysicalDeviceObject); + void* pBDDMemory = operator new(sizeof(BASIC_DISPLAY_DRIVER), POOL_FLAG_NON_PAGED); + BASIC_DISPLAY_DRIVER* pBDD = pBDDMemory ? new(pBDDMemory) BASIC_DISPLAY_DRIVER(pPhysicalDeviceObject) : NULL; if (pBDD == NULL) { BDD_LOG_LOW_RESOURCE0("pBDD failed to be allocated"); diff --git a/video/KMDOD/blthw.cxx b/video/KMDOD/blthw.cxx index b2f82492..0b1ff0b1 100644 --- a/video/KMDOD/blthw.cxx +++ b/video/KMDOD/blthw.cxx @@ -281,8 +281,7 @@ BDD_HWBLT::ExecutePresentDisplayOnly( SIZE_T sizeRects = NumDirtyRects*sizeof(RECT); SIZE_T size = sizeof(DoPresentMemory) + sizeMoves + sizeRects; - DoPresentMemory* ctx = reinterpret_cast<DoPresentMemory*> - (new (POOL_FLAG_PAGED) BYTE[size]); + DoPresentMemory* ctx = reinterpret_cast<DoPresentMemory*>(operator new[](size, POOL_FLAG_PAGED)); if (!ctx) { |
