mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 07:42:43 +00:00 
			
		
		
		
	
		
			
				
	
	
	
	
		
			696 B
		
	
	
	
	
	
	
	
			
		
		
	
	
			696 B
		
	
	
	
	
	
	
	
Name
create_shared_buffer - create a shareable memory buffer
Synopsis
#include <SharedBuffer.h>
int create_shared_buffer(int size, void** buffer);
Description
Creates a new memory region that can be shared with other processes. The region is only accessible to the creating process by default.
Return value
If a region is successfully created, create_shared_buffer() stores a pointer to the memory in buffer and returns a buffer ID. Otherwise, it returns -1 and sets errno to describe the error.
Errors
- EINVAL:- sizeis zero or negative.
- EFAULT:- bufferis not a valid address.
