Using gdAllocation (fixes #33)