Displaying 2 results from an estimated 2 matches for "ae_load_file_to_memory".
2012 Feb 06
1
Strange finding about kernel samepage merging
...by /sys/kernel/mm/ksm/page_sharing
increase dramatically, I mean, no matter what file I am loading, the
corresponding pages will always be merged.
Here is the simple program:
[root at fedora14 kernel]# cat testmkv.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int ae_load_file_to_memory(const char *filename, char **result)
{
int size = 0;
int ret;
FILE *f = fopen(filename, "rb");
if (f == NULL)
{
*result = NULL;
return -1; // -1 means file opening fail
}
fseek(f, 0, SEEK_END);
size = ft...
2012 Feb 06
1
Strange finding about kernel samepage merging
...by /sys/kernel/mm/ksm/page_sharing
increase dramatically, I mean, no matter what file I am loading, the
corresponding pages will always be merged.
Here is the simple program:
[root at fedora14 kernel]# cat testmkv.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int ae_load_file_to_memory(const char *filename, char **result)
{
int size = 0;
int ret;
FILE *f = fopen(filename, "rb");
if (f == NULL)
{
*result = NULL;
return -1; // -1 means file opening fail
}
fseek(f, 0, SEEK_END);
size = ft...