summaryrefslogtreecommitdiff
path: root/mysys/my_largepage.c
diff options
context:
space:
mode:
authorMarc Alff <marc.alff@sun.com>2009-12-09 20:19:51 -0700
committerMarc Alff <marc.alff@sun.com>2009-12-09 20:19:51 -0700
commitc082955f0676efe069f30384102ba7807b49dee6 (patch)
treecc0a038191d1969182d5dd108c891ee10a436cc0 /mysys/my_largepage.c
parent6fd3866c6c104f8bc991d71583e627ae6fabe0ab (diff)
downloadmariadb-git-c082955f0676efe069f30384102ba7807b49dee6.tar.gz
WL#2360 Performance schema
Part III: mysys instrumentation
Diffstat (limited to 'mysys/my_largepage.c')
-rw-r--r--mysys/my_largepage.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/mysys/my_largepage.c b/mysys/my_largepage.c
index d96e1048fd0..e65d3a0a5f5 100644
--- a/mysys/my_largepage.c
+++ b/mysys/my_largepage.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004 MySQL AB
+/* Copyright (C) 2004 MySQL AB, 2008-2009 Sun Microsystems, Inc
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -91,19 +91,20 @@ void my_large_free(uchar* ptr, myf my_flags __attribute__((unused)))
uint my_get_large_page_size_int(void)
{
- FILE *f;
+ MYSQL_FILE *f;
uint size = 0;
char buf[256];
DBUG_ENTER("my_get_large_page_size_int");
- if (!(f = my_fopen("/proc/meminfo", O_RDONLY, MYF(MY_WME))))
+ if (!(f= mysql_file_fopen(key_file_proc_meminfo, "/proc/meminfo",
+ O_RDONLY, MYF(MY_WME))))
goto finish;
- while (fgets(buf, sizeof(buf), f))
+ while (mysql_file_fgets(buf, sizeof(buf), f))
if (sscanf(buf, "Hugepagesize: %u kB", &size))
break;
- my_fclose(f, MYF(MY_WME));
+ mysql_file_fclose(f, MYF(MY_WME));
finish:
DBUG_RETURN(size * 1024);