Following issue #13390, fix compilation --without-pymalloc, and make sys.getallocatedblocks() return 0 in that situation.
diff --git a/Objects/obmalloc.c b/Objects/obmalloc.c
index c82c978..bbe2805 100644
--- a/Objects/obmalloc.c
+++ b/Objects/obmalloc.c
@@ -1316,6 +1316,13 @@
 {
     PyMem_FREE(p);
 }
+
+Py_ssize_t
+_Py_GetAllocatedBlocks(void)
+{
+    return 0;
+}
+
 #endif /* WITH_PYMALLOC */
 
 #ifdef PYMALLOC_DEBUG