Hi,<div><br></div><div>From what I learn from bulk_create, suppose I want to allocate a frame in the shared memory region on SCC by the following code snippet:</div><div><br></div><div>size_t bytes = PAGE_SIZE, allocated_size;</div>

<div>struct capref frame;</div><div><br></div><div>ram_set_affinity(SHARED_MEM_MIN, SHARED_MEM_MIN+bytes);</div><div>frame_alloc(&amp;frame, bytes, &amp;allocated_size);</div><div><br></div><div>(Q1) </div><div>Is this the right way to use ram_set_affinity (i.e, specify the following ram_alloc&#39;s physical memory range)?</div>

<div><br></div><div>(Q2)</div><div>During my experiment, the above code works well on core 1, 2, 3, etc (in independent runs), but it failed on core 0 with error MM_ERR_NOT_FOUND (Ram alloc failed due to constraints to mem_serv). Any ideas about this error?</div>

<div><br></div><div>(Q3)</div><div>When I set affinity to (SHARED_MEM_MIN, SHARED_MEM_MIN+PERCORE_MEM_SIZE), I can allocate a maximum 4MB frame, any frame_alloc attempt that larger that 4MB would fail with MM_ERR_NOT_FOUND. Since PERCORE_MEM_SIZE equals to 16MB, I don&#39;t under stand why even a 4MB alloc would fail. On the other hand, when I call frame_alloc without ram_set_affinity, then I could allocate a pretty large frame (say, 128MB). So the problems seems lie in the affinity settings.</div>

<div><br></div><div>Thanks in advance,</div><div>Jinghao</div>