bad patch applied to kdebase/kcontrol/memory_solaris.cpp
Helge Deller
deller at gmx.de
Sun Dec 5 08:44:43 GMT 2004
Hi Stefan,
I have no problems to revert this patch.
But since it was provided by Christopher Layne, we should give him at least a chance to come up with a newer patch which should work for both of you...
Christoper?
Best regards,
Helge
PS: I don't have a Solaris-box myself, so I would prefer if you both could discuss this off-list and come up with a new patch.
On Sunday 05 December 2004 02:16, Stefan Teleman wrote:
> Hi.
>
> A patch was applied to kdebase/kcontrol/memory_solaris.cpp between
> 3.3.1 and 3.3.2.
>
> This patch (diff between 3.3.1 and 3.3.2 attached) is wrong. The
> values reported by memory_solaris with this new patch are orders of
> magnitude off reality.
>
> 1. sysconf(_SC_PHYS_PAGES) does not report the total number of pages
> available to memory, just the number of pages in physical memory
> (i.e. core RAM).
> 2. swapctl (SC_AINFO, (void *) &struct anoninfo) reports wrong values.
> A comment to this effect already exists in memory_solaris.cpp.
>
> Values reported by the new patch :
>
> total memory: 2097152 MB
> total swap: 1546632 MB
> free swap: 1131280 MB
> used swap: 415852 MB
>
> swap -s reports:
>
> [steleman at obiwan][~/tmp][12/04/2004 20:22:21][3353]>> swap -s
> total: 276296k bytes allocated + 138784k reserved = 415080k used,
> 9520168k available
>
> This box has 2GB core RAM and 8GB swap. Total memory should be
> reported as 2GB physical + 8GB swap. Total swap should be reported as
> 8192 MB.
>
> The following #ifdef block is also wrong:
>
> /* Stop <sys/swap.h> from crapping out on 32-bit architectures. */
>
> #if !defined(_LP64) && _FILE_OFFSET_BITS == 64
> # undef _FILE_OFFSET_BITS
> # define _FILE_OFFSET_BITS 32
> #endif
>
> _FILE_OFFSET_BITS should *not* be redefined to 32. The error in
> sys/procfs.h is fixed by making _FILE_OFFSET_BITS undefined in this
> file only.
>
> The values reported by memory_solaris.cpp before this patch were
> correct.
>
> --Stefan
>
> --
> Stefan Teleman 'Nobody Expects the Spanish Inquisition'
> steleman at nyc.rr.com -Monty Python
>
More information about the kde-core-devel
mailing list