Lines Matching refs:size
32 size_t GetPageAlignedSize(size_t size) in GetPageAlignedSize() argument
34 return (size + NN_OS_MEMORY_PAGE_SIZE - 1) & ~(NN_OS_MEMORY_PAGE_SIZE - 1); in GetPageAlignedSize()
58 void SharedMemoryBlock::Map(size_t size, bool readOnly) in Map() argument
62 NN_ALIGN_TASSERT_( size, NN_OS_MEMORY_PAGE_SIZE ); in Map()
65 uptr addr = detail::AllocateFromSharedMemorySpace(this, size); in Map()
95 Result SharedMemoryBlock::TryInitialize(size_t size, bool readOnly, bool otherReadOnly, bool noMap) in TryInitialize() argument
97 size = GetPageAlignedSize(size); in TryInitialize()
103 result = nn::svc::CreateMemoryBlock(&handle, NULL, size, myPermission, otherPermission); in TryInitialize()
109 Map(size, readOnly); in TryInitialize()
114 void SharedMemoryBlock::Initialize(size_t size, bool readOnly, bool otherReadOnly, bool noMap) in Initialize() argument
116 NN_UTIL_PANIC_IF_FAILED(TryInitialize(size, readOnly, otherReadOnly, noMap)); in Initialize()
119 void SharedMemoryBlock::AttachAndMap(Handle handle, size_t size, bool readOnly) in AttachAndMap() argument
122 size = GetPageAlignedSize(size); in AttachAndMap()
125 Map(size, readOnly); in AttachAndMap()
161 void nnosSharedMemoryBlockAllocate(nnosSharedMemoryBlock* this_, size_t size, bool readOnly, bool o… in nnosSharedMemoryBlockAllocate() argument
163 new (this_) SharedMemoryBlock(size, readOnly, otherReadOnly, noMap); in nnosSharedMemoryBlockAllocate()