struct Frame_Info* ptr_new_frame ;
struct Env* myenv = curenv;
if(get_share_object_ID(ownerID, shareName) != E_SHARED_MEM_NOT_EXISTS)
return E_SHARED_MEM_EXISTS;
struct Share *allocatedObject=NULL;
index_of_shared= allocate_share_object(&allocatedObject);
int s= ROUNDUP(size,PAGE_SIZE)/PAGE_SIZE;
struct Frame_Info* frames_array[s];
if(index_of_shared!=E_NO_SHARE)
int r = allocate_frame(&ptr_new_frame);
frames_array[i]=ptr_new_frame;
r = map_frame(myenv->env_page_directory, ptr_new_frame, (void*)virtual_address, PERM_USER|PERM_WRITEABLE);
virtual_address+=PAGE_SIZE;
add_frame_to_storage(allocatedObject->framesStorage,frames_array[j],j);
allocatedObject->ownerID=ownerID;
allocatedObject->size=size;
allocatedObject->isWritable= isWritable;
allocatedObject->references=1;
for(int i= 0 ;i<64 ; i++)
allocatedObject->name[i]=shareName[i];