From 2db6bf399ecf5eeee74d91d90eeb19cfea3002d3 Mon Sep 17 00:00:00 2001 From: arcum42 Date: Thu, 5 Jan 2023 09:39:09 -0800 Subject: [PATCH] common: Remove pxUSE_SECURE_MALLOC. --- common/AlignedMalloc.h | 15 --------------- common/SafeArray.h | 7 ------- 2 files changed, 22 deletions(-) diff --git a/common/AlignedMalloc.h b/common/AlignedMalloc.h index 3b2f0098ba..894f863846 100644 --- a/common/AlignedMalloc.h +++ b/common/AlignedMalloc.h @@ -27,12 +27,6 @@ #include #endif -// pxUSE_SECURE_MALLOC - enables bounds checking on scoped malloc allocations. - -#ifndef pxUSE_SECURE_MALLOC -#define pxUSE_SECURE_MALLOC 0 -#endif - // Implementation note: all known implementations of _aligned_free check the pointer for // NULL status (our implementation under GCC, and microsoft's under MSVC), so no need to // do it here. @@ -148,25 +142,16 @@ public: T* GetPtr(uint idx = 0) const { -#if pxUSE_SECURE_MALLOC - IndexBoundsAssumeDev("ScopedAlloc", idx, m_size); -#endif return &m_buffer[idx]; } T& operator[](uint idx) { -#if pxUSE_SECURE_MALLOC - IndexBoundsAssumeDev("ScopedAlloc", idx, m_size); -#endif return m_buffer[idx]; } const T& operator[](uint idx) const { -#if pxUSE_SECURE_MALLOC - IndexBoundsAssumeDev("ScopedAlloc", idx, m_size); -#endif return m_buffer[idx]; } }; diff --git a/common/SafeArray.h b/common/SafeArray.h index 54f6b6076b..686ce271f4 100644 --- a/common/SafeArray.h +++ b/common/SafeArray.h @@ -17,13 +17,6 @@ #include "common/Pcsx2Defs.h" -// pxUSE_SECURE_MALLOC - enables bounds checking on scoped malloc allocations. - -#ifndef pxUSE_SECURE_MALLOC -#define pxUSE_SECURE_MALLOC 0 -#endif - - // Microsoft Windows only macro, useful for freeing out COM objects: #define safe_release(ptr) \ ((void)((((ptr) != NULL) && ((ptr)->Release(), !!0)), (ptr) = NULL))