forked from parallella/pal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
p_rmalloc.c
28 lines (26 loc) · 848 Bytes
/
p_rmalloc.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <pal.h>
#include <stddef.h>
#include <stdio.h>
#include "pal_base.h"
#include "pal_base_private.h"
/**
*
* Dynamically allocates contiguous memory buffers at any node within
* the specified 'team' object. All inter-node data communication within a
* team is done between these dynamically allocated memory blocks. The function
* returns a pointer to the buffer of allocated memory.
*
* @param team Team object descriptor (int)
*
* @param pid The relative processor id within the 'team' starting at 0.
*
* @param size Total amount of memory to allocate
*
* @return Returns a reference to the memory buffer.
* Returns negative value on error.
*/
p_mem_t p_rmalloc(p_team_t team, int pid, size_t size)
{
printf("Running p_rmalloc(p_team_t,%d,%d)\n", pid, (int)size);
return p_ref_err(ENOSYS);
}