Lines Matching refs:size
34 size_t GetPageAlignedSize(size_t size) in GetPageAlignedSize() argument
36 return (size + NN_OS_MEMORY_PAGE_SIZE - 1) & ~(NN_OS_MEMORY_PAGE_SIZE - 1); in GetPageAlignedSize()
60 Result SharedMemoryBlock::Map(size_t size, bool readOnly) in Map() argument
70 if ( ( size % NN_OS_MEMORY_PAGE_SIZE ) != 0 ) in Map()
76 uptr addr = os::detail::AllocateFromSharedMemorySpace(this, size); in Map()
108 Result SharedMemoryBlock::TryInitialize(size_t size, bool readOnly, bool otherReadOnly, bool noMap) in TryInitialize() argument
110 size = GetPageAlignedSize(size); in TryInitialize()
116 result = nn::svc::CreateMemoryBlock(&handle, NULL, size, myPermission, otherPermission); in TryInitialize()
122 result = Map(size, readOnly); in TryInitialize()
127 void SharedMemoryBlock::Initialize(size_t size, bool readOnly, bool otherReadOnly, bool noMap) in Initialize() argument
129 NN_OS_ERROR_IF_FAILED(TryInitialize(size, readOnly, otherReadOnly, noMap)); in Initialize()
132 Result SharedMemoryBlock::AttachAndMap(Handle handle, size_t size, bool readOnly) in AttachAndMap() argument
135 size = GetPageAlignedSize(size); in AttachAndMap()
138 return Map(size, readOnly); in AttachAndMap()
174 void nnosSharedMemoryBlockAllocate(nnosSharedMemoryBlock* this_, size_t size, bool readOnly, bool o… in nnosSharedMemoryBlockAllocate() argument
176 new (this_) SharedMemoryBlock(size, readOnly, otherReadOnly, noMap); in nnosSharedMemoryBlockAllocate()