]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/netapi.git/blobdiff - ti/runtime/netapi/src/netapi_vm.c
Merge branch 'master' of gtgit01.gt.design.ti.com:git/projects/netapi
[keystone-rtos/netapi.git] / ti / runtime / netapi / src / netapi_vm.c
index d61ddc6acb06f6a8778842dd778f2ce43a7ce16d..cba24bedce4f271f9b0b50edf4317fcd007f2bb0 100755 (executable)
@@ -92,6 +92,7 @@ static int  our_netapi_module_fd;
 static int temp_fd;
 #endif
 
+//inialize the allocate area.
 nwal_Bool_t netapi_VM_memAllocInit
 (
     uint8_t     *addr, /* Physical address */
@@ -155,6 +156,17 @@ nwal_Bool_t netapi_VM_memAllocInit
     return nwal_TRUE;
 }
 
+//utility to return free amount in buffer/descriptor area
+int  netapi_getBufMemRemainder(void)
+{
+  return (int) ((unsigned int) netapi_VM_mem_end) -  ((unsigned int) netapi_VM_mem_alloc_ptr);
+}
+
+
+//------------------------------------------------------------------------
+//allocator function for our Buffer/Descriptor/SAcontext area (either MSMC
+//or kernel module provided CMA area in DDR
+//-----------------------------------------------------------------------
 void* netapi_VM_memAlloc
 (
     uint32_t    size,