this may be a possibility i have not got around t trying it, it may need asm support
i kind of forget the vagaries of pbp labels
asm var RAM_END is set to last byte allocated by pbp
Ram past RAM_END and the physical end of memory is unused and could be allocated via the ext modifier
eg
buff var byte ext ;allocate a label

@buff=RAM_END (might need +1 , can't remember); set the label address of unused memory start

as long as you don't try to index buff past the physical end of memory i don't see any issue
you should calculate the amount you have first