- s
- A string to copy into the system heap.
A IntPtr containing a pointer on the system heap containing the marshaled string. If s is null, then IntPtr.Zero is returned.
Type Reason NotSupportedException There was an error marshaling s into the Mono.Unix.UnixEncoding encoding. Mono.Unix.UnixIOException Unable to allocate enough memory for the marshaled string. [Mono.Unix.Native.Errno.ENOMEM]
The pointer returned should be freed with UnixMarshal.FreeHeap to avoid a memory leak.
This is identical to UnixMarshal.StringToHeap(s, UnixMarshal.Instance).