Skip to content

Commit

Permalink
On max size
Browse files Browse the repository at this point in the history
  • Loading branch information
VSadov authored Sep 20, 2024
1 parent c87d02f commit 91a2406
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/design/features/InlineArrayAttribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ Example: the following holds: `sizeof(MyArray<T>) == Length * sizeof(T)`
Example: boxing/unboxing will result in exact copy on an entire instance: `object o = inst; MyArray<T> inst1copy = (MyArray<T>)o`

Type T can be a reference type and can contain managed references. The runtime will ensure that objects reachable through elements of an inline array instance can be accessed in a type-safe manner.

### Size limits for inline array instances.
The size limits for inline array instances will match the size limits of structs on a given runtime implementation.

Check failure on line 68 in docs/design/features/InlineArrayAttribute.md

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces [Expected: 0; Actual: 1]
Generally this is a very large size imposed by the type system implementation and is rarely reachable in actual applications due to other limitations such as max stack size, max size of an object, and similar.

### Special note on scenario when the element is readonly.

Expand Down

0 comments on commit 91a2406

Please sign in to comment.