~clint-fewbar/ubuntu/precise/erlang/merge-15b

« back to all changes in this revision

Viewing changes to lib/os_mon/src/memsup.erl

  • Committer: Package Import Robot
  • Author(s): Sergei Golovan
  • Date: 2011-12-15 19:20:10 UTC
  • mfrom: (1.1.18) (3.5.15 sid)
  • mto: (3.5.16 sid)
  • mto: This revision was merged to the branch mainline in revision 33.
  • Revision ID: package-import@ubuntu.com-20111215192010-jnxcfe3tbrpp0big
Tags: 1:15.b-dfsg-1
* New upstream release.
* Upload to experimental because this release breaks external drivers
  API along with ABI, so several applications are to be fixed.
* Removed SSL patch because the old SSL implementation is removed from
  the upstream distribution.
* Removed never used patch which added native code to erlang beam files.
* Removed the erlang-docbuilder binary package because the docbuilder
  application was dropped by upstream.
* Documented dropping ${erlang-docbuilder:Depends} substvar in
  erlang-depends(1) manpage.
* Made erlang-base and erlang-base-hipe provide virtual package
  erlang-abi-15.b (the number means the first erlang version, which
  provides current ABI).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
%%
2
2
%% %CopyrightBegin%
3
3
%% 
4
 
%% Copyright Ericsson AB 1996-2009. All Rights Reserved.
 
4
%% Copyright Ericsson AB 1996-2011. All Rights Reserved.
5
5
%% 
6
6
%% The contents of this file are subject to the Erlang Public License,
7
7
%% Version 1.1, (the "License"); you may not use this file except in
176
176
    PortMode = case OS of
177
177
                   {unix, darwin} -> false;
178
178
                   {unix, freebsd} -> false;
 
179
                   {unix, dragonfly} -> false;
179
180
                   % Linux supports this.
180
181
                   {unix, linux} -> true;
181
182
                   {unix, openbsd} -> true;
 
183
                   {unix, netbsd} -> true;
182
184
                   {unix, irix64} -> true;
183
185
                   {unix, irix} -> true;
184
186
                   {unix, sunos} -> true;
610
612
            PortMode = case OS of
611
613
                           {unix, darwin} -> false;
612
614
                           {unix, freebsd} -> false;
 
615
                           {unix, dragonfly} -> false;
613
616
                           {unix, linux} -> false;
614
617
                           {unix, openbsd} -> true;
 
618
                           {unix, netbsd} -> true;
615
619
                           {unix, sunos} -> true;
616
620
                           {win32, _OSname} -> false;
617
621
                           vxworks -> true
687
691
get_os_wordsize({unix, darwin})  -> get_os_wordsize_with_uname();
688
692
get_os_wordsize({unix, netbsd})  -> get_os_wordsize_with_uname();
689
693
get_os_wordsize({unix, freebsd}) -> get_os_wordsize_with_uname();
 
694
get_os_wordsize({unix, dragonfly}) -> get_os_wordsize_with_uname();
690
695
get_os_wordsize({unix, openbsd}) -> get_os_wordsize_with_uname();
691
696
get_os_wordsize(_)               -> unsupported_os.
692
697
 
736
741
 
737
742
%% FreeBSD: Look in /usr/include/sys/vmmeter.h for the format of struct
738
743
%% vmmeter
739
 
get_memory_usage({unix,freebsd}) ->
 
744
get_memory_usage({unix,OSname}) when OSname == freebsd; OSname == dragonfly ->
740
745
    PageSize  = freebsd_sysctl("vm.stats.vm.v_page_size"),
741
746
    PageCount = freebsd_sysctl("vm.stats.vm.v_page_count"),
742
747
    FreeCount = freebsd_sysctl("vm.stats.vm.v_free_count"),
779
784
        {unix, freebsd} ->
780
785
            [{total_memory, Total}, {free_memory, Total-Alloc},
781
786
             {system_total_memory, Total}];
 
787
        {unix, dragonfly} ->
 
788
            [{total_memory, Total}, {free_memory, Total-Alloc},
 
789
             {system_total_memory, Total}];
782
790
        {unix, darwin} ->
783
791
            [{total_memory, Total}, {free_memory, Total-Alloc},
784
792
             {system_total_memory, Total}];