lib/xmltree/xmlinterface.cpp: use posix_fadvise to try reduce cached pages, while loading huge epg data

Origin commit data
------------------
Branch: ni/coolstream
Commit: f15e5eeb39
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2014-07-23 (Wed, 23 Jul 2014)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
[CST] Focus
2014-07-23 13:15:55 +04:00
parent 821c34add7
commit 83e65661d3

View File

@@ -42,7 +42,8 @@
#else /* USE_LIBXML */
#include "xmltok.h"
#endif /* USE_LIBXML */
#include <fcntl.h>
#include <stdio.h>
unsigned long xmlGetNumericAttribute(const xmlNodePtr node, const char *name, const int base)
{
@@ -239,6 +240,9 @@ xmlDocPtr parseXmlFile(const char * filename, bool warning_by_nonexistence /* =
}
while (!done);
if (posix_fadvise(fileno(xml_file), 0, 0, POSIX_FADV_DONTNEED) != 0)
perror("posix_fadvise FAILED!");
fclose(xml_file);
if (!tree_parser->RootNode())