I am storing around 14GB of data in following map:
struct data
{
char* a;
char* b;
data(char* _a, char* _b)
{
int alen = strlen(a);
a = new char[alen+1];
strcpy(a,_a);
a[alen]='\0';
int blen = strlen(_b);
b = new char[ blen+1];
strcpy(b,_b);
b[blen]='\0';
}
~data()
{
delete [] a;
delete [] b;
}
};
struct ltstr
{
bool operator()(const char* s1, const char* s2) const
{
return strcmp(s1, s2) < 0;
}
};
map<const char*, data*, ltstr> m;
Program runs for certain number of records(10440440 out of 26293289) and after some time i a m getting following error message.
Program terminated with signal SIGKILL, Killed.
The program no longer exists.
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.25.el6.x86_64 libgcc- 4.4.5-6.el6.x86_64 libstdc++-4.4.5-6.el6.x86_64
how can i avoid above termination?
Server Specification:
Mem: 24605344k total, 15148556k used, 9456788k free, 20892k buffers
Swap: 2097144k total, 161364k used, 1935780k free, 14469244k cached