Error PHP Fatal error: Allowed memory size of 67108864 bytes exhausted(tried to allocate 401 bytes)

While running script I am getting an error like

Few lines in data are not being processed.

After googling it I came to know that adding such line would give some memory to it

ini_set("memory_limit","64M");

my input file size is 1 GB.

Is that memory limit is based on RAM we have on the system ?

It's never RAM -- even Solaris zones just purges your pages if you exceed RAM pages allowed! Someone is limiting you, as that is not the message for no swap (malloc'd space) or for no address space (all heap, code, stack, mapped file space). Google says it is PHP, and usually it means by script error you are taking in all the rows at once; 67M is a lot for a web page.