我需要包含哪个头文件才能访问os_zalloc()?

时间:2017-08-17 11:20:17

标签: c memory header-files dynamic-memory-allocation

我正在尝试使用函数GMSCoordinateBounds,但似乎无法找到要包含的头文件。根据stackoverflow问题:What is zalloc in embedded programming?,定义应在os_zalloc()中给出。包括mem.h而未指定特定路径会产生错误:

mem.h

我有几个声称他们是test.c:1:17: fatal error: mem.h: No such file or directory #include <mem.h> 的文件。两个第一个文件不包含任何数据。虽然接下来的两个文件没有定义mem.h

os_zalloc()

因此,在程序中包含任何这些文件并使用指定的路径编译它们会导致错误:

root@main:/# find / -name "mem.h"
usr/src/linux-headers-3.13.0-32-generic/include/config/infiniband/user/mem.h
/usr/src/linux-headers-3.13.0-32-generic/include/config/fix/earlycon/mem.h
/usr/src/linux-headers-3.13.0-32/arch/um/include/shared/mem.h
/usr/src/linux-headers-3.13.0-32/arch/mips/include/asm/mach-loongson/mem.h

我还试图加入test.c:328: undefined reference to `os_zalloc' collect2: error: ld returned 1 exit status 。这很好用。但是函数memory.h似乎没有在这里指定:

os_zalloc

简短的问题是我想使用函数#include <memory.h> ,但我似乎无法知道包含它的内容(或者它是否存在于我的系统中)。有人有什么建议吗?

0 个答案:

没有答案