Jump to content

How to track memory allocation


jeffjohnvol

Recommended Posts

I searched for this, but the search daemon couldn't be reached....

 

I am using a Drupal CMS, which allows the addition of "modules"  Each module that gets activated requires more memory to be allocated as it pulls up the "modules" page, eventually giving a memory allocation error.

 

I am suspecting that some "modules" require more memory than others, and there may be one that is using way too much.  Is there a way to track how much memory has been allocated (or likewise, how much is still available) while a page is being generated in PHP?

 

Something I could output to a table, file or screen?

Link to comment
https://forums.phpfreaks.com/topic/166619-how-to-track-memory-allocation/
Share on other sites

Run it through a profiler/debugger.

 

I think patrickvmi post may do what i need, but if it doesn't, is there one you recommend.  I should say that this is a hosted solution through 1and1.com, so I may not be able to run a tool like that.  I would have bumped up my memory allocation to 64 MB if I did have the access.  I'm limited to 40MB as it is. :(

 

Thanks!

Is there any reason you couldn't profile it and debug it on your local computer? The only PHP debugger/profiler I've ever used was the one in Zend Studio, but you can obviously find other free ones as well.

 

Good point.  If it comes down to that, that would be a good solution.  I would have to get apache on my pc (obviously) as well as the rest of the site. 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.