On Sat, Oct 22, 2016 at 6:40 PM, T L wrote:
>
> On Saturday, October 22, 2016 at 11:59:55 PM UTC+8, Ian Lance Taylor wrote:
>>
>> On Sat, Oct 22, 2016 at 2:01 AM, T L wrote:
>> >
>> > On Saturday, October 22, 2016 at 4:57:52 PM UTC+8, T L wrote:
>> >>
>> >>
>> >> The string struct used internally
On Saturday, October 22, 2016 at 11:59:55 PM UTC+8, Ian Lance Taylor wrote:
>
> On Sat, Oct 22, 2016 at 2:01 AM, T L >
> wrote:
> >
> > On Saturday, October 22, 2016 at 4:57:52 PM UTC+8, T L wrote:
> >>
> >>
> >> The string struct used internally is
> >>
> >> type stringStruct struct {
>
DIscounting even garbage collector: is there any memory allocator anywhere that
provides a facility to only return bytes at the start of an allocation to the
manager? realloc() only lets you return bytes at the end, and most other
allocators I've seen are based on that one's API...
> On Oct 22,
On Sat, Oct 22, 2016 at 2:01 AM, T L wrote:
>
> On Saturday, October 22, 2016 at 4:57:52 PM UTC+8, T L wrote:
>>
>>
>> The string struct used internally is
>>
>> type stringStruct struct {
>> str unsafe.Pointer
>> len int
>> }
>>
>> When following f function is called and s is cleared,
>>
On Sat, Oct 22, 2016 at 11:02 AM T L wrote:
> I mean how do go runtime knows "abcdefg" instead of "cde" should be
released.
It's a simple case of some programming ;-)
(More here:
https://en.wikipedia.org/wiki/Garbage_collection_(computer_science))
--
-j
--
You received this message because
On Saturday, October 22, 2016 at 4:57:52 PM UTC+8, T L wrote:
>
>
> The string struct used internally is
>
> type stringStruct struct {
> str unsafe.Pointer
> len int
> }
>
> When following f function is called and s is cleared,
> how do go runtime knows the starting memory address of th