Skip to content

Commit 4e63236

Browse files
committed
add comment on MemoryInternalCheckPointer
1 parent e022f27 commit 4e63236

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

src/platform/ESP32/CHIPMem-PlatformDefault.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ void MemoryFree(void * p)
5959

6060
bool MemoryInternalCheckPointer(const void * p, size_t min_size)
6161
{
62+
// We don't have a way to know if p is allocated from the heap, just do a null check here.
6263
return (p != nullptr);
6364
}
6465

src/platform/ESP32/CHIPMem-PlatformExternal.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ void MemoryFree(void * p)
5959

6060
bool MemoryInternalCheckPointer(const void * p, size_t min_size)
6161
{
62+
// We don't have a way to know if p is allocated from the heap, just do a null check here.
6263
return (p != nullptr);
6364
}
6465

src/platform/ESP32/CHIPMem-PlatformInternal.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ void MemoryFree(void * p)
5959

6060
bool MemoryInternalCheckPointer(const void * p, size_t min_size)
6161
{
62+
// We don't have a way to know if p is allocated from the heap, just do a null check here.
6263
return (p != nullptr);
6364
}
6465

0 commit comments

Comments
 (0)