Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Maximum Memory Allocation Limit

Explorer ,
Jun 07, 2012 Jun 07, 2012

Hello everyone,

I m using OpenCV recently to do a lot of computation.

The main problem is that I need to replace the OpenCV memory allocation by After effect "host_new_handle" calls.

This work pretty well in a lot of situation but i think I bumped into a problem.

I m trying to allocate a 1920*1080 size image of 3 channel, 32 bits, but 12 times at once.

so the memory size I m trying to allocate through new_handle is around 300Mb.

And it raises an error.

I m wondering if anyone knows about a limit of maximum memory that After Effects may allow at once.

TOPICS
SDK
2.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 07, 2012 Jun 07, 2012

AE is supposed to allow you to allocate all the available ram.

no limit other than that.

in one of my plug-ins i allocated over over 500mb per frame.

needless to say that it made the ram previews very very short.

before optimizing the plug-in to eventually use 1/100th the ram, there was one thing that rally helped:

i broke my ram allocation down to smaller blocks.

when you ask for 300mb of ram, you're asking for a single block of 300mb.

that amount of ram might be available, but not as a single block.

if you can do your computation on a series of blocks, that might help.

anyways,

unless something has changed in AE since a few years back when i made that monster ram allocation i talked about, you should be able to allocate that amount of ram.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 07, 2012 Jun 07, 2012

Thank you for your answer.

I guess that is my problem: allocating the whole amount as a single block is impossible.

But As openCV images are considered as single block of memory... I may not be able to circumvent it without getting deep into the source...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jun 08, 2012 Jun 08, 2012

If you are using C interface you can allocate the header with OpenCV, cvCreateImageHeader (little of system memory) and allocate imageData with suites, or, for some operations, even use layer data!

greets

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 08, 2012 Jun 08, 2012

that s what i did, but the amount of memory i tried to allocate at once with host_new_handle seemed to be to large and crashed,

Because imageData of opencv is just as a single block.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jun 08, 2012 Jun 08, 2012
LATEST

you can try a couple of options

a) use AEGP_NewMemHandle from memory suite

b) allocate with C runtime, despite what the docs say...

Now if you allocate a lot of ram for frame data, there only danger to that is that AE would compete with the plugin for memory, your system may be come slow and swap to disk a lot. You have to test it with ammount of RAM your target system has, you might get away with that!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines