common: Remove pxUSE_SECURE_MALLOC.

This commit is contained in:
arcum42 2023-01-05 09:39:09 -08:00
parent a5bc49ee4a
commit 2db6bf399e
2 changed files with 0 additions and 22 deletions

View File

@ -27,12 +27,6 @@
#include <malloc.h> #include <malloc.h>
#endif #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 // 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 // NULL status (our implementation under GCC, and microsoft's under MSVC), so no need to
// do it here. // do it here.
@ -148,25 +142,16 @@ public:
T* GetPtr(uint idx = 0) const T* GetPtr(uint idx = 0) const
{ {
#if pxUSE_SECURE_MALLOC
IndexBoundsAssumeDev("ScopedAlloc", idx, m_size);
#endif
return &m_buffer[idx]; return &m_buffer[idx];
} }
T& operator[](uint idx) T& operator[](uint idx)
{ {
#if pxUSE_SECURE_MALLOC
IndexBoundsAssumeDev("ScopedAlloc", idx, m_size);
#endif
return m_buffer[idx]; return m_buffer[idx];
} }
const T& operator[](uint idx) const const T& operator[](uint idx) const
{ {
#if pxUSE_SECURE_MALLOC
IndexBoundsAssumeDev("ScopedAlloc", idx, m_size);
#endif
return m_buffer[idx]; return m_buffer[idx];
} }
}; };

View File

@ -17,13 +17,6 @@
#include "common/Pcsx2Defs.h" #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: // Microsoft Windows only macro, useful for freeing out COM objects:
#define safe_release(ptr) \ #define safe_release(ptr) \
((void)((((ptr) != NULL) && ((ptr)->Release(), !!0)), (ptr) = NULL)) ((void)((((ptr) != NULL) && ((ptr)->Release(), !!0)), (ptr) = NULL))