What is the "stance" on objects that reside on the heap, and
internal pointers?
I understand that for stack objects, it leads to data corruption,
due to data being bit-moved when passed around.
But what about heap data? Currently, our GC doesn't move data
around, but what if it did? Would in
On 1/19/14 8:18 AM, monarch_dodra wrote:
What is the "stance" on objects that reside on the heap, and internal
pointers?
I understand that for stack objects, it leads to data corruption, due to
data being bit-moved when passed around.
But what about heap data? Currently, our GC doesn't move dat
Quick dlang.org investigation has found this:
http://dlang.org/phobos/std_exception.html#.pointsTo
Note:
Evaluating pointsTo(x, x) checks whether x has internal pointers.
This should only be done as an assertive test, as the language is
free to assume objects don't have internal pointers (TDPL
20-Jan-2014 20:35, Dmitry Olshansky пишет:
19-Jan-2014 20:18, monarch_dodra пишет:
My usecase is pretty trivial: A linked list. This is often implemented
as a "single" sentinel that serves as both pre-head/post-tail. When the
list is empty, the sentinel simply points to itself.
You could us
19-Jan-2014 20:18, monarch_dodra пишет:
What is the "stance" on objects that reside on the heap, and internal
pointers?
I understand that for stack objects, it leads to data corruption, due to
data being bit-moved when passed around.
But what about heap data? Currently, our GC doesn't move data
On Monday, 20 January 2014 at 12:27:41 UTC, Dicebot wrote:
Quick dlang.org investigation has found this:
http://dlang.org/phobos/std_exception.html#.pointsTo
Note:
Evaluating pointsTo(x, x) checks whether x has internal
pointers. This should only be done as an assertive test, as the
language
On Monday, 20 January 2014 at 16:35:26 UTC, Dmitry Olshansky
wrote:
You could use internal pointers for this case as long as:
a) The struct will never get copied and/or moved. No pass by
value, only pointers.
b) It's out of GC control and in particular GC-allocated
built-in arrays.
This means
On Mon, 20 Jan 2014 14:22:34 -0500, monarch_dodra
wrote:
On Monday, 20 January 2014 at 12:27:41 UTC, Dicebot wrote:
Quick dlang.org investigation has found this:
http://dlang.org/phobos/std_exception.html#.pointsTo
Note:
Evaluating pointsTo(x, x) checks whether x has internal pointers. Thi
On Mon, 20 Jan 2014 11:35:10 -0500, Dmitry Olshansky
wrote:
19-Jan-2014 20:18, monarch_dodra пишет:
My usecase is pretty trivial: A linked list. This is often implemented
as a "single" sentinel that serves as both pre-head/post-tail. When the
list is empty, the sentinel simply points to i
On Monday, 20 January 2014 at 19:48:01 UTC, Steven Schveighoffer
wrote:
On Mon, 20 Jan 2014 11:35:10 -0500, Dmitry Olshansky
wrote:
19-Jan-2014 20:18, monarch_dodra пишет:
My usecase is pretty trivial: A linked list. This is often
implemented
as a "single" sentinel that serves as both
p
20-Jan-2014 23:48, Steven Schveighoffer пишет:
On Mon, 20 Jan 2014 11:35:10 -0500, Dmitry Olshansky
wrote:
19-Jan-2014 20:18, monarch_dodra пишет:
My usecase is pretty trivial: A linked list. This is often implemented
as a "single" sentinel that serves as both pre-head/post-tail. When the
20-Jan-2014 23:41, Steven Schveighoffer пишет:
On Mon, 20 Jan 2014 14:22:34 -0500, monarch_dodra
wrote:
On Monday, 20 January 2014 at 12:27:41 UTC, Dicebot wrote:
Quick dlang.org investigation has found this:
http://dlang.org/phobos/std_exception.html#.pointsTo
Note:
Evaluating pointsTo(x,
On Mon, 20 Jan 2014 14:58:12 -0500, Dmitry Olshansky
wrote:
20-Jan-2014 23:48, Steven Schveighoffer пишет:
I think this is somewhat too general. It can be GC allocated, even
GC-array allocated. The GC will not move around your array unexpectedly
without updating the pointers.
But a movin
On Friday, 24 January 2014 at 12:40:44 UTC, Tobias Pankrath wrote:
On Monday, 20 January 2014 at 20:20:01 UTC, Steven
Schveighoffer wrote:
On Mon, 20 Jan 2014 14:58:12 -0500, Dmitry Olshansky
wrote:
20-Jan-2014 23:48, Steven Schveighoffer пишет:
I think this is somewhat too general. It can
On Monday, 20 January 2014 at 20:20:01 UTC, Steven Schveighoffer
wrote:
On Mon, 20 Jan 2014 14:58:12 -0500, Dmitry Olshansky
wrote:
20-Jan-2014 23:48, Steven Schveighoffer пишет:
I think this is somewhat too general. It can be GC allocated,
even
GC-array allocated. The GC will not move aro
15 matches
Mail list logo