summaryrefslogtreecommitdiffstats
path: root/src/include/usr/hwpf/fapi/fapiErrorInfo.H
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/usr/hwpf/fapi/fapiErrorInfo.H')
-rw-r--r--src/include/usr/hwpf/fapi/fapiErrorInfo.H73
1 files changed, 73 insertions, 0 deletions
diff --git a/src/include/usr/hwpf/fapi/fapiErrorInfo.H b/src/include/usr/hwpf/fapi/fapiErrorInfo.H
index 336552957..60c0b29f0 100644
--- a/src/include/usr/hwpf/fapi/fapiErrorInfo.H
+++ b/src/include/usr/hwpf/fapi/fapiErrorInfo.H
@@ -133,6 +133,25 @@ public:
*/
uint32_t getFfdcId() {return iv_ffdcId;}
+#ifdef FAPI_CUSTOM_MALLOC
+ /**
+ * @brief Overload new operator to use platform-specific allocator
+ *
+ * @param[in] i_sz Size of memory to allocate in bytes
+ *
+ * @return Pointer to allocated memory
+ */
+ static void * operator new(size_t i_sz);
+
+ /**
+ * @brief Overload delete operator to use platform-specific deallocator
+ *
+ * @param[in] i_ptr Pointer to memory previously allocated with new
+ */
+ static void operator delete(void * i_ptr);
+#endif
+
+
private:
// FFDC Identifier
@@ -166,6 +185,24 @@ struct ErrorInfoProcedureCallout
const ProcedureCallouts::ProcedureCallout i_procedure,
const CalloutPriorities::CalloutPriority i_calloutPriority);
+#ifdef FAPI_CUSTOM_MALLOC
+ /**
+ * @brief Overload new operator to use platform-specific allocator
+ *
+ * @param[in] i_sz Size of memory to allocate in bytes
+ *
+ * @return Pointer to allocated memory
+ */
+ static void * operator new(size_t i_sz);
+
+ /**
+ * @brief Overload delete operator to use platform-specific deallocator
+ *
+ * @param[in] i_ptr Pointer to memory previously allocated with new
+ */
+ static void operator delete(void * i_ptr);
+#endif
+
// The procedure to callout
ProcedureCallouts::ProcedureCallout iv_procedure;
@@ -222,6 +259,24 @@ struct ErrorInfoCDG
const bool i_gard,
const CalloutPriorities::CalloutPriority i_priority);
+#ifdef FAPI_CUSTOM_MALLOC
+ /**
+ * @brief Overload new operator to use platform-specific allocator
+ *
+ * @param[in] i_sz Size of memory to allocate in bytes
+ *
+ * @return Pointer to allocated memory
+ */
+ static void * operator new(size_t i_sz);
+
+ /**
+ * @brief Overload delete operator to use platform-specific deallocator
+ *
+ * @param[in] i_ptr Pointer to memory previously allocated with new
+ */
+ static void operator delete(void * i_ptr);
+#endif
+
// The target to callout/deconfigure/GARD
Target iv_target;
@@ -290,6 +345,24 @@ struct ErrorInfo
*/
~ErrorInfo();
+#ifdef FAPI_CUSTOM_MALLOC
+ /**
+ * @brief Overload new operator to use platform-specific allocator
+ *
+ * @param[in] i_sz Size of memory to allocate in bytes
+ *
+ * @return Pointer to allocated memory
+ */
+ static void * operator new(size_t i_sz);
+
+ /**
+ * @brief Overload delete operator to use platform-specific deallocator
+ *
+ * @param[in] i_ptr Pointer to memory previously allocated with new
+ */
+ static void operator delete(void * i_ptr);
+#endif
+
// Vector of FFDC Data
std::vector<ErrorInfoFfdc *> iv_ffdcs;
typedef std::vector<ErrorInfoFfdc *>::iterator ErrorInfoFfdcItr_t;
OpenPOWER on IntegriCloud