Hi, i have 450Mb file with content, one per line.

I need to do an action for each line, so i thought to use

for i in $(cat filename);do
echo "$i"
but it returns error:
xrealloc: cannot reallocate 449492864 bytes (0 bytes allocated)
i dotn want to upgrade to a higher RAM VPS, how can i solve this smartly?