- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Very quick question. Can this fail?
[cpp]ptr = scalable_aligned_malloc(size, alignment); assert(size==scalable_msize(ptr));[/cpp]Thanks.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes it can.
You can think of scalable_msize as the biggest size for which scalable_realloc returns the same address that it received.
You can think of scalable_msize as the biggest size for which scalable_realloc returns the same address that it received.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
[bash]assert(size <= scalable_msize(ptr));[/bash]
![](/skins/images/8B5EA638CA3587CA763EE9EF53643DD4/responsive_peak/images/icon_anonymous_message.png)
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page