Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

I understand that NHRT can have no references to the standard heap, and I thought I was creating arguments that are objects in ImmortalMemory, but I get IllegalArgumentException. How can I find out which of the arguments being passed to the NHRT constructor is being created in the heap?

0
Posted

I understand that NHRT can have no references to the standard heap, and I thought I was creating arguments that are objects in ImmortalMemory, but I get IllegalArgumentException. How can I find out which of the arguments being passed to the NHRT constructor is being created in the heap?

0

Use MemoryArea.getMemoryArea() to check the allocation context for each argument being passed. Note that some arguments, if left null, will be taken from the current real-time thread. Also check that if you are creating a ScopedMemory for the NHRT, the ScopedMemory object itself cannot be allocated in heap.

Related Questions

Experts123