We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1cdb488 commit 9cc5693Copy full SHA for 9cc5693
src/commons/utils/include/pdc_malloc.h
@@ -76,8 +76,8 @@ void *PDC_free(void *mem);
76
*/
77
size_t PDC_get_global_mem_usage();
78
79
-#define PDC_MALLOC(t) (t *)PDC_malloc(sizeof(t))
80
-#define PDC_CALLOC(c, t) (t *)PDC_calloc(c, sizeof(t))
+#define PDC_MALLOC(t) (t *)PDC_malloc(sizeof(t) + 1)
+#define PDC_CALLOC(c, t) (t *)PDC_calloc(c, sizeof(t) + 1)
81
82
#define PDC_FREE(t, obj) (t *)(intptr_t) PDC_free(obj)
83
0 commit comments