0
0

Hi,

I’ve tried using the getMemoryInfo functions to get more detail about my memory usage. But i’m getting the "not implemented" error for the 4.21.01 development version, which (please correct me if i’m wrong) should have it already included. Am i missing something?

cheers and thanks
manni

  • You must to post comments
0
0

According to the docs this should also already be included in the stable release and we desperately need it…

16/10/08 4.19.07 – Development branch release

  • Added getMemoryInfo function to all public classes, both low-level and event
    system. Use this function to get detailed information on the memory usage of
    any FMOD object.
  • You must to post comments
0
0

it is in 4.20 and 4.21.
You’re getting that message because you’re using the release lib and not the release with logging lib which is required.

In the latest releases though we enabled memory tracking in both builds (release and release with logging).

This feature is still being worked on, and is getting more accurate, the last release had a few gaps which are being closed in tomorrow’s release. getMemoryUsed has to actually manually count through all the classes to add up what memory is being used where, so we have to catch every case which is a lot of work. As it stands now there is some discrepency between getMemoryused at the root EventSystem level and FMOD::Memory_GetStats.

  • You must to post comments
0
0

sorry, is working with 4.20.02 on pc and wii

another question: getMemoryInfo on an event only gives me the size all the structures and settings need – is it possible to get the portion of the wavebank loaded for this specific event (or the sounds used by the event) too? or is it possible to go through a loaded group or wavebank and output all the portions of wave-data that is in memory?
with the wavebankinfo only the complete chunk of memory used by the wavebank can be seen, but breaking this down to single wave-data would be really helpful to check which sound/event uses how much memory

thx, manni

  • You must to post comments
0
0

[quote="manni":2zxu7qau]
is it possible to get the portion of the wavebank loaded for this specific event (or the sounds used by the event) too? or is it possible to go through a loaded group or wavebank and output all the portions of wave-data that is in memory?[/quote:2zxu7qau]

I could really use this kind of functionality as well. I thought FMOD_EVENT_MEMBITS_MEMORYFSB or FMOD_MEMBITS_SAMPLE would do the job (passed into getMemoryInfo), but neither seem to return wavebank memory usage of a loaded EventGroup structure.

  • You must to post comments
0
0

Today’s release will make the eventsystem->getMemoryInfo match memory_getstats closely. So far in my project it is a few megabytes of memory, and the 2 are about 436 bytes apart.

Next stage will be giving completely accurate results across all bank formats and event types, and then we’ll make sure event scans its waves and adds that into Event::getMemoryInfo statistics, to give you what you want.

  • You must to post comments
0
0

[quote="brett":1j8pqd1r]Next stage will be giving completely accurate results across all bank formats and event types, and then we’ll make sure event scans its waves and adds that into Event::getMemoryInfo statistics, to give you what you want.[/quote:1j8pqd1r]

Brett – any updates on this feature?

I was just trying to do that – add up the Event::getMemoryInfo for each loaded event, to see which events are the memory hogs, but the values dont come close to the system total, and that would make sense if the wave data were still left out…

I understand it can be tricky if two events different share the same wave data, that the memory total would be LARGER than the system total, but it would still be very useful to tune memory usage.

Thanks –

  • You must to post comments
0
0

I just upgraded our code to use getMemoryInfo. In our actual game we see about 2 MB of "unknown" memory at the end (much of which is CODEC which isn’t tracked correctly). If it helps, here it is:

[code:2831n4rg]
// So far this is still the only reliable way to get the total current memory.
FMOD::Memory_GetStats((int)&profileData.m_totalMem, NULL);
pSystem->getSoundRAM( (int
)&profileData.m_rsxMem, NULL, NULL );
profileData.m_totalMem += profileData.m_rsxMem;
profileData.m_unknownMem = profileData.m_totalMem;

// Get low level memory all at once, because it’s expensive to call this too many times;
s_pFMODEventSystem->getMemoryInfo( FMOD_MEMBITS_ALL, NULL, NULL, memarray );

// Sample memory
profileData.m_sampleMem += memarray[FMOD_MEMTYPE_SOUND];
profileData.m_unknownMem -= profileData.m_sampleMem;

// Stream memory
// StreamBuffer is apparently currently unused and is always 0.
profileData.m_streamMem = memarra[FMOD_MEMTYPE_STREAMBUFFER];
profileData.m_streamMem += memarray[FMOD_MEMTYPE_FILE];
// Sadly, memtype codec is a liar. It cannot be trusted.
//profileData.m_streamMem += memarray[FMOD_MEMTYPE_CODEC];
profileData.m_unknownMem -= profileData.m_streamMem;

// DSP Memory
profileData.m_dspMem = memarray[FMOD_MEMTYPE_DSP];
profileData.m_dspMem += memarray[FMOD_MEMTYPE_DSPCONNECTION];
profileData.m_dspMem += memarray[FMOD_MEMTYPE_DSPCODEC];
profileData.m_unknownMem -= profileData.m_streamMem;

// System memory
profileData.m_systemMem = memarray[FMOD_MEMTYPE_OTHER];
profileData.m_systemMem += memarray[FMOD_MEMTYPE_SYSTEM];
profileData.m_systemMem += memarray[FMOD_MEMTYPE_PLUGINS];
profileData.m_systemMem += memarray[FMOD_MEMTYPE_OUTPUT];
profileData.m_systemMem += memarray[FMOD_MEMTYPE_CHANNEL];
profileData.m_systemMem += memarray[FMOD_MEMTYPE_CHANNELGROUP];
profileData.m_systemMem += memarray[FMOD_MEMTYPE_SOUNDGROUP];
profileData.m_systemMem += memarray[FMOD_MEMTYPE_PROFILE];
profileData.m_systemMem += memarray[FMOD_MEMTYPE_RECORDBUFFER];
profileData.m_systemMem += memarray[FMOD_MEMTYPE_REVERB];
profileData.m_systemMem += memarray[FMOD_MEMTYPE_REVERBCHANNELPROPS];
profileData.m_systemMem += memarray[FMOD_MEMTYPE_GEOMETRY];
profileData.m_systemMem += memarray[FMOD_MEMTYPE_SYNCPOINT];
profileData.m_unknownMem -= profileData.m_systemMem;

// Event Instances
s_pFMODEventSystem->getMemoryInfo( NULL, FMOD_EVENT_MEMBITS_EVENTINSTANCE, &profileData.m_eventInstancesMem, memarray );
profileData.m_unknownMem -= profileData.m_eventInstancesMem;

// Event Definitions/Config
s_pFMODEventSystem->getMemoryInfo( NULL, FMOD_EVENT_MEMBITS_ALL & ~FMOD_EVENT_MEMBITS_EVENTINSTANCE, &profileData.m_eventDefinitionsMem, memarray );
profileData.m_unknownMem -= profileData.m_eventDefinitionsMem;
[/code:2831n4rg]

  • You must to post comments
Showing 7 results
Your Answer

Please first to submit.