add tools/addrs
This commit is contained in:
@@ -52,6 +52,8 @@ target_link_libraries(max-os-perf perfect)
|
||||
add_executable(min-os-perf min_os_perf.cpp)
|
||||
target_link_libraries(min-os-perf perfect)
|
||||
|
||||
add_executable(addrs addrs.cpp)
|
||||
|
||||
## OpenMP
|
||||
find_package(OpenMP)
|
||||
if (OpenMP_FOUND)
|
||||
|
10
tools/addrs.cpp
Normal file
10
tools/addrs.cpp
Normal file
@@ -0,0 +1,10 @@
|
||||
#include <iostream>
|
||||
|
||||
int main(void) {
|
||||
int a;
|
||||
int *b = new int;
|
||||
std::cout << "main: " << uintptr_t(main) << "\n";
|
||||
std::cout << "stack: " << uintptr_t(&a) << "\n";
|
||||
std::cout << "heap: " << uintptr_t(b) << "\n";
|
||||
delete b;
|
||||
}
|
Reference in New Issue
Block a user