2004-06-07 Dhruv Matani <dhruvbird@gmx.net>
Paolo Carlini <pcarlini@suse.de> * testsuite/testsuite_performance.h (resource_counter::allocated_memory): Make it return the right number of bytes requested by the allocators/application. This is the sbrk+mmaped memory. Co-Authored-By: Paolo Carlini <pcarlini@suse.de> From-SVN: r82725
This commit is contained in:
parent
85bbb21f8f
commit
345b912f50
@ -1,3 +1,11 @@
|
||||
2004-06-07 Dhruv Matani <dhruvbird@gmx.net>
|
||||
Paolo Carlini <pcarlini@suse.de>
|
||||
|
||||
* testsuite/testsuite_performance.h
|
||||
(resource_counter::allocated_memory): Make it return the right
|
||||
number of bytes requested by the allocators/application. This is
|
||||
the sbrk+mmaped memory.
|
||||
|
||||
2004-06-02 Gabriel Dos Reis <gdr@integrable-solutions.net>
|
||||
|
||||
* include/std/std_complex.h (log): Tidy.
|
||||
|
@ -43,16 +43,33 @@
|
||||
#elif defined (__FreeBSD__)
|
||||
extern "C"
|
||||
{
|
||||
struct mallinfo { int uordblks; };
|
||||
struct mallinfo mallinfo(void)
|
||||
{ struct mallinfo m = { (((size_t) sbrk (0) + 1023) / 1024) }; return m; }
|
||||
struct mallinfo
|
||||
{
|
||||
int uordblks;
|
||||
int hblkhd;
|
||||
};
|
||||
|
||||
struct mallinfo
|
||||
mallinfo(void)
|
||||
{
|
||||
struct mallinfo m = { (((size_t) sbrk (0) + 1023) / 1024), 0 };
|
||||
return m;
|
||||
}
|
||||
}
|
||||
#else
|
||||
extern "C"
|
||||
{
|
||||
struct mallinfo { int uordblks; };
|
||||
struct mallinfo empty = { 0 };
|
||||
struct mallinfo mallinfo(void) { return empty; }
|
||||
struct mallinfo
|
||||
{
|
||||
int uordblks;
|
||||
int hblkhd;
|
||||
};
|
||||
|
||||
struct mallinfo empty = { 0, 0 };
|
||||
|
||||
struct mallinfo
|
||||
mallinfo(void)
|
||||
{ return empty; }
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -101,9 +118,9 @@ namespace __gnu_test
|
||||
|
||||
class resource_counter
|
||||
{
|
||||
int who;
|
||||
rusage rusage_begin;
|
||||
rusage rusage_end;
|
||||
int who;
|
||||
rusage rusage_begin;
|
||||
rusage rusage_end;
|
||||
struct mallinfo allocation_begin;
|
||||
struct mallinfo allocation_end;
|
||||
|
||||
@ -139,7 +156,8 @@ namespace __gnu_test
|
||||
|
||||
int
|
||||
allocated_memory() const
|
||||
{ return allocation_end.uordblks - allocation_begin.uordblks; }
|
||||
{ return ((allocation_end.uordblks - allocation_begin.uordblks)
|
||||
+ (allocation_end.hblkhd - allocation_begin.hblkhd)); }
|
||||
|
||||
long
|
||||
hard_page_fault() const
|
||||
|
Loading…
Reference in New Issue
Block a user