Skip to content

Commit f043e67

Browse files
committed
[FreeBSD] Get virtual memory limit
Reuse existing implementation, but change the include from sysctl.h to resource.h - that should still work on other POSIX platforms.
1 parent 7908507 commit f043e67

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

lib/Runtime/PlatformAgnostic/Platform/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ elseif(CC_TARGET_OS_OSX)
3434
Unix/SystemInfo.cpp
3535
# Linux/PerfTrace.cpp # TODO : implement for OSX?
3636
)
37+
elseif(CC_TARGET_OS_FREEBSD)
38+
set(PL_SOURCE_FILES ${PL_SOURCE_FILES}
39+
Unix/SystemInfo.cpp
40+
)
3741
endif()
3842

3943
add_library (Chakra.Runtime.PlatformAgnostic OBJECT

lib/Runtime/PlatformAgnostic/Platform/Unix/SystemInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#include "Common.h"
77
#include "ChakraPlatform.h"
8-
#include <sys/sysctl.h>
8+
#include <sys/resource.h>
99

1010
namespace PlatformAgnostic
1111
{

0 commit comments

Comments
 (0)