Greetings,
I'm trying to figure out if there's a way in PHP to figure out how much RAM a particular variable is consuming at any given time. More specifically, I want to know how much RAM an entire structure is using.
Basically, I'm in a position where I know I can't use more than 1.5MB of RAM and I'm trying to sort a VERY large data set. I'm using an external sort, but I want to know how many records I can load into RAM and sort at any given point. Thanks for the help!!!
How much server ram does a variable consume?
Moderator: General Moderators
-
hokiecsgrad
- Forum Newbie
- Posts: 17
- Joined: Fri Oct 22, 2004 2:55 pm
The only thing I can think of is to edit your ini file and alter this:
To 1.5.
Code: Select all
;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;
max_execution_time = 30 ; Maximum execution time of each script, in seconds
max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
memory_limit = 8M ; Maximum amount of memory a script may consume (8MB)- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact: