FreeBSD Bugzilla – Attachment 14567 Details for
Bug 27350
/compat/linux/proc/meminfo has size overflow
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 2.51 KB, created by
Jim.Pirzyk
on 2001-05-15 18:50:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Jim.Pirzyk
Created:
2001-05-15 18:50:01 UTC
Size:
2.51 KB
patch
obsolete
>*** ./sys/i386/linux/linprocfs/linprocfs_misc.c.orig Thu Dec 7 05:17:55 2000 >--- ./sys/i386/linux/linprocfs/linprocfs_misc.c Tue May 15 10:35:34 2001 >*************** >*** 92,100 **** > unsigned long memfree; /* free memory in bytes */ > unsigned long memshared; /* shared memory ??? */ > unsigned long buffers, cached; /* buffer / cache memory ??? */ >! unsigned long swaptotal; /* total swap space in bytes */ >! unsigned long swapused; /* used swap space in bytes */ >! unsigned long swapfree; /* free swap space in bytes */ > vm_object_t object; > > if (uio->uio_rw != UIO_READ) >--- 92,100 ---- > unsigned long memfree; /* free memory in bytes */ > unsigned long memshared; /* shared memory ??? */ > unsigned long buffers, cached; /* buffer / cache memory ??? */ >! unsigned long long swaptotal; /* total swap space in bytes */ >! unsigned long long swapused; /* used swap space in bytes */ >! unsigned long long swapfree; /* free swap space in bytes */ > vm_object_t object; > > if (uio->uio_rw != UIO_READ) >*************** >*** 117,124 **** > swaptotal = 0; > swapfree = 0; > } else { >! swaptotal = swapblist->bl_blocks * 1024; /* XXX why 1024? */ >! swapfree = swapblist->bl_root->u.bmu_avail * PAGE_SIZE; > } > swapused = swaptotal - swapfree; > memshared = 0; >--- 117,124 ---- > swaptotal = 0; > swapfree = 0; > } else { >! swaptotal = (unsigned long long) swapblist->bl_blocks * 1024ULL; /* XXX why 1024? */ >! swapfree = (unsigned long long) swapblist->bl_root->u.bmu_avail * PAGE_SIZE; > } > swapused = swaptotal - swapfree; > memshared = 0; >*************** >*** 142,155 **** > ps += sprintf(ps, > " total: used: free: shared: buffers: cached:\n" > "Mem: %lu %lu %lu %lu %lu %lu\n" >! "Swap: %lu %lu %lu\n" > "MemTotal: %9lu kB\n" > "MemFree: %9lu kB\n" > "MemShared:%9lu kB\n" > "Buffers: %9lu kB\n" > "Cached: %9lu kB\n" >! "SwapTotal:%9lu kB\n" >! "SwapFree: %9lu kB\n", > memtotal, memused, memfree, memshared, buffers, cached, > swaptotal, swapused, swapfree, > B2K(memtotal), B2K(memfree), >--- 142,155 ---- > ps += sprintf(ps, > " total: used: free: shared: buffers: cached:\n" > "Mem: %lu %lu %lu %lu %lu %lu\n" >! "Swap: %llu %llu %llu\n" > "MemTotal: %9lu kB\n" > "MemFree: %9lu kB\n" > "MemShared:%9lu kB\n" > "Buffers: %9lu kB\n" > "Cached: %9lu kB\n" >! "SwapTotal:%9llu kB\n" >! "SwapFree: %9llu kB\n", > memtotal, memused, memfree, memshared, buffers, cached, > swaptotal, swapused, swapfree, > B2K(memtotal), B2K(memfree),
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 27350
: 14567