We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b1e6f49 commit 47138b7Copy full SHA for 47138b7
src/memory-analyzer/gdb_api.cpp
@@ -59,6 +59,14 @@ gdb_apit::~gdb_apit()
59
60
size_t gdb_apit::query_malloc_size(const std::string &pointer_expr)
61
{
62
+#ifndef __linux__
63
+ // The memory analyzer can be compiled under OSX and other systems that can
64
+ // interact with the machine interface of gdb but `malloc_usable_size` is only
65
+ // available under linux. Under non-linux system we simple return 1, i.e. as
66
+ // if the \p pointer_expr was not dynamically allocated.
67
+ return 1;
68
+#endif
69
+
70
write_to_gdb("-var-create tmp * malloc_usable_size(" + pointer_expr + ")");
71
72
if(!was_command_accepted())
0 commit comments