Thanks. Completely forgot that about.  I may not need allocate_memory after all.