File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -239,10 +239,13 @@ get_total_memory({unix,darwin}) ->
239
239
PageSize * (Inactive + Active + Free + Wired );
240
240
241
241
get_total_memory ({unix ,freebsd }) ->
242
- PageSize = freebsd_sysctl (" vm.stats.vm.v_page_size" ),
243
- PageCount = freebsd_sysctl (" vm.stats.vm.v_page_count" ),
242
+ PageSize = sysctl (" vm.stats.vm.v_page_size" ),
243
+ PageCount = sysctl (" vm.stats.vm.v_page_count" ),
244
244
PageCount * PageSize ;
245
245
246
+ get_total_memory ({unix ,openbsd }) ->
247
+ sysctl (" hw.usermem" );
248
+
246
249
get_total_memory ({win32 ,_OSname }) ->
247
250
% % Due to the Erlang print format bug, on Windows boxes the memory
248
251
% % size is broken. For example Windows 7 64 bit with 4Gigs of RAM
@@ -342,7 +345,7 @@ parse_line_aix(Line) ->
342
345
false -> list_to_integer (Value )
343
346
end }.
344
347
345
- freebsd_sysctl (Def ) ->
348
+ sysctl (Def ) ->
346
349
list_to_integer (cmd (" /sbin/sysctl -n " ++ Def ) -- " \n " ).
347
350
348
351
% % file:read_file does not work on files in /proc as it seems to get
You can’t perform that action at this time.
0 commit comments