Skip to content

Commit

Permalink
Remove usage of crtdbg in favor of anyhow using VLD
Browse files Browse the repository at this point in the history
  • Loading branch information
dcristoloveanu committed Jan 20, 2017
1 parent 6b0f668 commit a9f6c78
Show file tree
Hide file tree
Showing 37 changed files with 323 additions and 653 deletions.
5 changes: 0 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ option(run_e2e_tests "set run_e2e_tests to ON to run e2e tests (default is OFF)
option(run_longhaul_tests "set run_longhaul_tests to ON to run longhaul tests (default is OFF)[if possible, they are always built]" OFF)
option(run_unittests "set run_unittests to ON to run unittests (default is OFF)" OFF)
option(skip_samples "set skip_samples to ON to skip building samples (default is OFF)[if possible, they are always built]" OFF)
option(leak_detection "set leak_detection to ON (default is OFF)" OFF)
option(compileOption_C "passes a string to the command line of the C compiler" OFF)
option(compileOption_CXX "passes a string to the command line of the C++ compiler" OFF)
option(use_wsio "set use_wsio to ON to use libwebsockets for WebSocket support (default is OFF)" OFF)
Expand Down Expand Up @@ -141,10 +140,6 @@ include_directories(${CMAKE_CURRENT_LIST_DIR}/inc ${SHARED_UTIL_INC_FOLDER})

add_definitions(-D_CRT_SECURE_NO_WARNINGS)

if(${leak_detection})
add_definitions(-D_CRTDBG_MAP_ALLOC)
endif()

if(${memory_trace})
else()
add_definitions(-DDISABLE_MEMORY_TRACE)
Expand Down
2 changes: 1 addition & 1 deletion c-utility
Submodule c-utility updated 130 files
89 changes: 0 additions & 89 deletions mbed/tcpsocketconnection_c.cpp

This file was deleted.

25 changes: 0 additions & 25 deletions mbed/tcpsocketconnection_c.h

This file was deleted.

61 changes: 0 additions & 61 deletions mbed/tickcounter.c

This file was deleted.

27 changes: 0 additions & 27 deletions mbed/tickcounter.h

This file was deleted.

7 changes: 0 additions & 7 deletions samples/eh_sender_with_sas_token_sample/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#include <stdlib.h>
#ifdef _CRTDBG_MAP_ALLOC
#include <crtdbg.h>
#endif
#include <stdio.h>
#include <stdbool.h>
#include <time.h>
Expand Down Expand Up @@ -235,9 +232,5 @@ int main(int argc, char** argv)
result = 0;
}

#ifdef _CRTDBG_MAP_ALLOC
_CrtDumpMemoryLeaks();
#endif

return result;
}
7 changes: 0 additions & 7 deletions samples/local_client_sample/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#include <stdlib.h>
#ifdef _CRTDBG_MAP_ALLOC
#include <crtdbg.h>
#endif
#include <stdio.h>
#include <stdbool.h>
#include "azure_c_shared_utility/platform.h"
Expand Down Expand Up @@ -136,9 +133,5 @@ int main(int argc, char** argv)
result = 0;
}

#ifdef _CRTDBG_MAP_ALLOC
_CrtDumpMemoryLeaks();
#endif

return result;
}
7 changes: 0 additions & 7 deletions samples/local_server_sample/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#include <stdlib.h>
#ifdef _CRTDBG_MAP_ALLOC
#include <crtdbg.h>
#endif
#include <stdio.h>
#include <stdbool.h>
#include "azure_c_shared_utility/platform.h"
Expand Down Expand Up @@ -128,9 +125,5 @@ int main(int argc, char** argv)
printf("Current memory usage:%lu\r\n", (unsigned long)amqpalloc_get_current_memory_used());
}

#ifdef _CRTDBG_MAP_ALLOC
_CrtDumpMemoryLeaks();
#endif

return result;
}
8 changes: 0 additions & 8 deletions samples/message_receiver_sample/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#include <stdlib.h>
#ifdef _CRTDBG_MAP_ALLOC
#include <crtdbg.h>
#endif

#include <stdio.h>
#include <stdbool.h>
#include "azure_c_shared_utility/platform.h"
Expand Down Expand Up @@ -125,10 +121,6 @@ int main(int argc, char** argv)

(void)printf("Max memory usage:%lu\r\n", (unsigned long)amqpalloc_get_maximum_memory_used());
(void)printf("Current memory usage:%lu\r\n", (unsigned long)amqpalloc_get_current_memory_used());

#ifdef _CRTDBG_MAP_ALLOC
_CrtDumpMemoryLeaks();
#endif
}

return result;
Expand Down
7 changes: 0 additions & 7 deletions samples/message_sender_sample/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#include <stdlib.h>
#ifdef _CRTDBG_MAP_ALLOC
#include <crtdbg.h>
#endif
#include <stdio.h>
#include <stdbool.h>
#include "azure_c_shared_utility/platform.h"
Expand Down Expand Up @@ -162,9 +159,5 @@ int main(int argc, char** argv)
result = 0;
}

#ifdef _CRTDBG_MAP_ALLOC
_CrtDumpMemoryLeaks();
#endif

return result;
}
7 changes: 0 additions & 7 deletions samples/mssbcbs_sample/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#include <stdlib.h>
#ifdef _CRTDBG_MAP_ALLOC
#include <crtdbg.h>
#endif
#include <stdio.h>
#include <stdbool.h>
#include "azure_c_shared_utility/platform.h"
Expand Down Expand Up @@ -202,9 +199,5 @@ int main(int argc, char** argv)
printf("Current memory usage:%lu\r\n", (unsigned long)amqpalloc_get_current_memory_used());
}

#ifdef _CRTDBG_MAP_ALLOC
_CrtDumpMemoryLeaks();
#endif

return 0;
}
Loading

0 comments on commit a9f6c78

Please sign in to comment.