RCCE_shmalloc.3 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. .TH RCCE 3 "September 2010" "RCCE MANPAGE" "RCCE Library"
  2. .SH NAME
  3. RCCE_shmalloc \- allocates size bytes of shared SCC memory that is not of type MPBT.
  4. .SH SYNOPSIS
  5. .B #include <rcce.h>
  6. .sp
  7. .BI "volatile char * RCCE_shmalloc(size_t " size );
  8. .SH DESCRIPTION
  9. .BR RCCE_shmalloc
  10. allocates size bytes of shared SCC memory that is not of type MPBT.
  11. It returns a pointer to this memory
  12. The memory is allocated from off-chip DRAM. The data move between the registers
  13. of a core and shared memory (that is, it bypasses the caches entirely) with
  14. a granularity of 1, 2, 4 or 8 bytes. For these memory operations,
  15. due to the restrictions of the P54C architecture, only one read or write
  16. may be active at one time to an address.
  17. .PP
  18. This is a collective call that should be issued by all participating cores.
  19. All cores will allocate space that is exactly overlapping.
  20. .PP
  21. RCCE_shmalloc() maintains a linked list of pointers to memory. Each pointer
  22. has associated with it a field specifying whether that block of memory is
  23. free or not.
  24. .PP
  25. Alternatively, you could use RCCE_shmalloc() to determine the beginning of
  26. the off-chip shared memory on all cores and subsequently let just one core
  27. do all the allocating and freeing. This core can then pass offsets to other
  28. cores that need to know what shared memory regions were involved.
  29. .TP
  30. .B size
  31. Size in bytes of the requested space.
  32. .SH "RETURN VALUE"
  33. Upon successful completion
  34. .BR RCCE_shmalloc()
  35. returns a char * pointer to the start of the allocated bytes.
  36. .SH ERRORS
  37. Look in
  38. .BR rcce.h
  39. for additional error codes.
  40. .SH "SEE ALSO"
  41. rcce.h(5)
  42. .SH EXAMPLE
  43. .PP
  44. To be supplied.