[ASK] About memory_limit ?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
zipcoi
Forum Newbie
Posts: 10
Joined: Tue May 06, 2008 2:55 am

[ASK] About memory_limit ?

Post by zipcoi »

hi .. I want to ask ..

I set in php.ini, memory_limit = 7168M (meaning 7GB) .. 8GB of memory my computer .. but after I run a large script that holds the data in the array so that large memory-consuming .. why array only able to accommodate only up to about 2GB and print out error message like this: "Fatal error: Allowed memory size of X bytes exhausted (tried to allocate Y bytes )...".. but there's still about 5GB that have not been used according to the previously located ..

if anyone has ever experienced and knows the solution?

thanks for the solution .. :D
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: [ASK] About memory_limit ?

Post by Eran »

Did you restart your web server after changing the memory limit? as an aside, this doesn't sound like a healthy script to say the least
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: [ASK] About memory_limit ?

Post by pickle »

Great Caesar's Ghost!!! What script needs 7GB of RAM?!?!?!
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
zipcoi
Forum Newbie
Posts: 10
Joined: Tue May 06, 2008 2:55 am

Re: [ASK] About memory_limit ?

Post by zipcoi »

pytrin wrote:Did you restart your web server after changing the memory limit? as an aside, this doesn't sound like a healthy script to say the least
yes I've restrart.. it's not about healthy script.. I just want to test, how about performance of PHP to handle large execution of script..
pickle wrote:Great Caesar's Ghost!!! What script needs 7GB of RAM?!?!?!
I just want to test..
zipcoi
Forum Newbie
Posts: 10
Joined: Tue May 06, 2008 2:55 am

Re: [ASK] About memory_limit ?

Post by zipcoi »

I've found the answer now..

in windows 32bit.. memory only limit for about 2gb to used by application..
Post Reply