-
大小: 3.9MB文件類型: .zip金幣: 2下載: 0 次發(fā)布日期: 2023-10-01
- 語言: 其他
- 標(biāo)簽: websockets??
資源簡介
libwebsockets-master

代碼片段和文件信息
#include?“private-libwebsockets.h“
#if?defined(LWS_PLAT_OPTEE)
#define?TEE_USER_MEM_HINT_NO_FILL_ZERO???????0x80000000
void?*__attribute__((weak))
TEE_Malloc(uint32_t?size?uint32_t?hint)
{
return?NULL;
}
void?*__attribute__((weak))
TEE_Realloc(void?*buffer?uint32_t?newSize)
{
return?NULL;
}
void?__attribute__((weak))
TEE_Free(void?*buffer)
{
}
void?*lws_realloc(void?*ptr?size_t?size)
{
return?TEE_Realloc(ptr?size);
}
void?*lws_malloc(size_t?size)
{
return?TEE_Malloc(size?TEE_USER_MEM_HINT_NO_FILL_ZERO);
}
void?lws_free(void?*p)
{
TEE_Free(p);
}
void?*lws_zalloc(size_t?size)
{
void?*ptr?=?TEE_Malloc(size?TEE_USER_MEM_HINT_NO_FILL_ZERO);
if?(ptr)
memset(ptr?0?size);
return?ptr;
}
void?lws_set_allocator(void?*(*cb)(void?*ptr?size_t?size))
{
(void)cb;
}
#else
static?void?*_realloc(void?*ptr?size_t?size)
{
if?(size)
#if?defined(LWS_PLAT_OPTEE)
return?(void?*)TEE_Realloc(ptr?size);
#else
return?(void?*)realloc(ptr?size);
#endif
else?if?(ptr)
free(ptr);
return?NULL;
}
void?*(*_lws_realloc)(void?*ptr?size_t?size)?=?_realloc;
void?*lws_realloc(void?*ptr?size_t?size)
{
return?_lws_realloc(ptr?size);
}
void?*lws_zalloc(size_t?size)
{
void?*ptr?=?_lws_realloc(NULL?size);
if?(ptr)
memset(ptr?0?size);
return?ptr;
}
void?lws_set_allocator(void?*(*cb)(void?*ptr?size_t?size))
{
_lws_realloc?=?cb;
}
#endif
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2017-02-12?10:57??libwebsockets-master\
?????文件?????????554??2017-02-12?10:57??libwebsockets-master\.gitignore
?????文件????????1673??2017-02-12?10:57??libwebsockets-master\.travis.yml
?????文件?????????872??2017-02-12?10:57??libwebsockets-master\Android.mk
?????文件???????54146??2017-02-12?10:57??libwebsockets-master\CMakeLists.txt
?????文件?????????961??2017-02-12?10:57??libwebsockets-master\FindLibWebSockets.cmake
?????文件?????????127??2017-02-12?10:57??libwebsockets-master\Kconfig
?????文件???????28281??2017-02-12?10:57??libwebsockets-master\LICENSE
?????文件???????15019??2017-02-12?10:57??libwebsockets-master\README.build.md
?????文件???????25203??2017-02-12?10:57??libwebsockets-master\README.coding.md
?????文件????????1322??2017-02-12?10:57??libwebsockets-master\README.esp8266.md
?????文件???????13227??2017-02-12?10:57??libwebsockets-master\README.generic-sessions.md
?????文件????????6490??2017-02-12?10:57??libwebsockets-master\README.generic-table.md
?????文件???????18742??2017-02-12?10:57??libwebsockets-master\README.lwsws.md
?????文件????????4289??2017-02-12?10:57??libwebsockets-master\README.md
?????文件????????1645??2017-02-12?10:57??libwebsockets-master\README.problems.md
?????文件???????12995??2017-02-12?10:57??libwebsockets-master\README.test-apps.md
?????文件????????2143??2017-02-12?10:57??libwebsockets-master\appveyor.yml
?????文件????????5284??2017-02-12?10:57??libwebsockets-master\autobahn-test.sh
?????文件???????22930??2017-02-12?10:57??libwebsockets-master\changelog
?????目錄???????????0??2017-02-12?10:57??libwebsockets-master\cmake\
?????文件????????6519??2017-02-12?10:57??libwebsockets-master\cmake\FindGit.cmake
?????文件?????????703??2017-02-12?10:57??libwebsockets-master\cmake\FindOpenSSLbins.cmake
?????文件?????????643??2017-02-12?10:57??libwebsockets-master\cmake\LibwebsocketsConfig.cmake.in
?????文件?????????386??2017-02-12?10:57??libwebsockets-master\cmake\LibwebsocketsConfigVersion.cmake.in
?????文件????????5857??2017-02-12?10:57??libwebsockets-master\cmake\UseRPMTools.cmake
?????文件????????1187??2017-02-12?10:57??libwebsockets-master\component.mk
?????目錄???????????0??2017-02-12?10:57??libwebsockets-master\contrib\
?????目錄???????????0??2017-02-12?10:57??libwebsockets-master\contrib\abi\
?????文件????????1888??2017-02-12?10:57??libwebsockets-master\contrib\abi\README.md
?????文件????????3313??2017-02-12?10:57??libwebsockets-master\contrib\abi\libwebsockets.json
............此處省略424個(gè)文件信息
評論
共有 條評論