From 047cc82d5646ff1927ffcb03133dc1d772569645 Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=A9dric=20Villemain?= Date: Wed, 23 Dec 2009 23:25:05 +0100 Subject: [PATCH] remove useless total mem --- ChangeLog | 1 + pgfincore.c | 10 ++++------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7cc8f3a..e959228 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,7 @@ - improve output (more informations) - add pgsysconf() - add pgmincore_snapshot to write mincore state in a file + - add pgfadv_willneed_snapshot to read mincore state from file 26/10/2009 Cédric Villemain diff --git a/pgfincore.c b/pgfincore.c index 26ae1e8..0f8c7a9 100644 --- a/pgfincore.c +++ b/pgfincore.c @@ -349,8 +349,8 @@ pgfadvise_file(char *filename, int action, FunctionCallInfo fcinfo) { HeapTuple tuple; TupleDesc tupdesc; - Datum values[5]; - bool nulls[5]; + Datum values[4]; + bool nulls[4]; // for open file int fd; @@ -364,8 +364,7 @@ pgfadvise_file(char *filename, int action, FunctionCallInfo fcinfo) TupleDescInitEntry(tupdesc, (AttrNumber) 1, "relpath", TEXTOID, -1, 0); TupleDescInitEntry(tupdesc, (AttrNumber) 2, "block_size", INT8OID, -1, 0); TupleDescInitEntry(tupdesc, (AttrNumber) 3, "block_disk", INT8OID, -1, 0); - TupleDescInitEntry(tupdesc, (AttrNumber) 4, "block_cache", INT8OID, -1, 0); - TupleDescInitEntry(tupdesc, (AttrNumber) 5, "block_free", INT8OID, -1, 0); + TupleDescInitEntry(tupdesc, (AttrNumber) 4, "block_free", INT8OID, -1, 0); tupdesc = BlessTupleDesc(tupdesc); @@ -423,8 +422,7 @@ pgfadvise_file(char *filename, int action, FunctionCallInfo fcinfo) values[0] = CStringGetTextDatum(filename); values[1] = Int64GetDatum(pageSize); values[2] = Int64GetDatum(st.st_size/pageSize); - values[3] = Int64GetDatum( sysconf(_SC_PHYS_PAGES) ); /* total page cache */ - values[4] = Int64GetDatum( sysconf(_SC_AVPHYS_PAGES) ); /* free page cache */ + values[3] = Int64GetDatum( sysconf(_SC_AVPHYS_PAGES) ); /* free page cache */ memset(nulls, 0, sizeof(nulls)); -- 2.39.5