Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add VxWorks support #81

Merged
merged 2 commits into from
May 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ set(FOONATHAN_MEMORY_VERSION "${FOONATHAN_MEMORY_VERSION_MAJOR}.${FOONATHAN_MEMO
set(CMAKE_DEBUG_POSTFIX "-dbg")

# installation destinations
if(UNIX)
if(UNIX OR VXWORKS)
include(GNUInstallDirs)

set(FOONATHAN_MEMORY_INC_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}/foonathan_memory")
Expand Down
2 changes: 1 addition & 1 deletion src/virtual_memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void foonathan::memory::virtual_memory_decommit(void* memory,
auto result = VirtualFree(memory, no_pages * virtual_memory_page_size, MEM_DECOMMIT);
FOONATHAN_MEMORY_ASSERT_MSG(result, "cannot decommit memory");
}
#elif defined(__unix__) || defined(__APPLE__) // POSIX systems
#elif defined(__unix__) || defined(__APPLE__) || defined(__VXWORKS__) // POSIX systems
#include <sys/mman.h>
#include <unistd.h>

Expand Down