Implement memory allocation functions

Change-Id: I5949dc49587612dae67b085f088f0612d6601ddb
diff --git a/services/server/env/fuchsia/allocmem.cc b/services/server/env/fuchsia/allocmem.cc
index 460524f..b53690c 100644
--- a/services/server/env/fuchsia/allocmem.cc
+++ b/services/server/env/fuchsia/allocmem.cc
@@ -28,50 +28,46 @@
 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */ /**************************************************************************/
 
+#include <cstdlib>
+
 extern "C" {
 #include "img_defs.h"
 #include "allocmem.h"
 #include "osfunc.h"
 }
 
-#define NOT_IMPLEMENTED() fprintf(stderr, "msd-img-rgx-mtk: Not implemented in %s:%s:%d\n", __func__, __FILE__, __LINE__);
-
 void *
 OSAllocMem(IMG_UINT32 ui32Size)
 {
-	NOT_IMPLEMENTED();
-	return 0;
+	return malloc(ui32Size);
 }
 
 void *
 OSAllocZMem(IMG_UINT32 ui32Size)
 {
-	NOT_IMPLEMENTED();
-	return 0;
+	return calloc(1, ui32Size);
 }
 
 /*
  * The parentheses around OSFreeMem prevent the macro in allocmem.h from
  * applying, as it would break the function's definition.
  */
-void(OSFreeMem)(void *pvMem) { NOT_IMPLEMENTED(); }
+void(OSFreeMem)(void *pvMem) { free(pvMem); }
 
 void *
 OSAllocMemNoStats(IMG_UINT32 ui32Size)
 {
-	NOT_IMPLEMENTED();
-	return 0;
+	return malloc(ui32Size);
 }
 
 void *
 OSAllocZMemNoStats(IMG_UINT32 ui32Size)
 {
-	NOT_IMPLEMENTED();
-	return 0;
+	return calloc(1, ui32Size);
 }
 
 /*
  * The parentheses around OSFreeMemNoStats prevent the macro in allocmem.h from
  * applying, as it would break the function's definition.
  */
-void(OSFreeMemNoStats)(void *pvMem) { NOT_IMPLEMENTED(); }
+void(OSFreeMemNoStats)(void *pvMem) { free(pvMem); }