On 4/3/15 6:08 PM, Kitt wrote:
On Friday, 3 April 2015 at 22:06:06 UTC, Namespace wrote:
On Friday, 3 April 2015 at 22:02:13 UTC, Kitt wrote:
Hello. I’m trying to write my own version of a list that doesn’t rely
on the garbage collector. I’m working on a very bare bones
implementation using
2. When you malloc, you use 'two.sizeof' and 'ten.sizeof'.
Integers are 4 bytes, so you were allocating 4 bytes for each
of these (not 2 or 10 bytes as is alluded to above).
Yeah, my mistake. I saw the mistake but could not describe it
correctly. :)
Namespace:
I've written a straight forward linked list implementation
here:
https://github.com/nomad-software/etcetera/blob/master/source/etcetera/collection/linkedlist.d
Even though I'm using the GC to manage memory, maybe it will
help you.
Good idea to link to some existing code. Here
On Saturday, 4 April 2015 at 09:05:03 UTC, bearophile wrote:
Namespace:
I've written a straight forward linked list implementation
here:
https://github.com/nomad-software/etcetera/blob/master/source/etcetera/collection/linkedlist.d
Even though I'm using the GC to manage memory, maybe it
Hello. I’m trying to write my own version of a list that doesn’t
rely on the garbage collector. I’m working on a very bare bones
implementation using malloc and free, but I’m running into an
exception when I attempt to call free. Here is a very minimal
code sample to illustrate the issue:
//
On Friday, 3 April 2015 at 22:08:52 UTC, Kitt wrote:
Thanks for the help =) I guess I've been in C# land at work for
way too long now, my low level C skills are evaporating!
I've written a straight forward linked list implementation here:
On Friday, 3 April 2015 at 22:02:13 UTC, Kitt wrote:
Hello. I’m trying to write my own version of a list that
doesn’t rely on the garbage collector. I’m working on a very
bare bones implementation using malloc and free, but I’m
running into an exception when I attempt to call free. Here is
a
On Friday, 3 April 2015 at 22:06:06 UTC, Namespace wrote:
On Friday, 3 April 2015 at 22:02:13 UTC, Kitt wrote:
Hello. I’m trying to write my own version of a list that
doesn’t rely on the garbage collector. I’m working on a very
bare bones implementation using malloc and free, but I’m
running
Wow, I can't even begin to explain how red my cheeks are right
now. You're completely right; I have no idea what my head was
thinking. Sure enough, call malloc with the correct type, and
the error goes away =P
Thanks for the help =) I guess I've been in C# land at work for
way too long now,
On Friday, 3 April 2015 at 22:38:00 UTC, Gary Willoughby wrote:
On Friday, 3 April 2015 at 22:08:52 UTC, Kitt wrote:
Thanks for the help =) I guess I've been in C# land at work
for way too long now, my low level C skills are evaporating!
I've written a straight forward linked list
10 matches
Mail list logo