Whether s.front uses GC is determined by s.front implementation,
caller can't affect it.
On Friday, 13 February 2015 at 09:13:48 UTC, Kagamin wrote:
Whether s.front uses GC is determined by s.front
implementation, caller can't affect it.
I'm talking about internal changes to DMD, in this case.
On Friday, 13 February 2015 at 08:21:53 UTC, Per Nordlöw wrote:
When reading/parsing data from disk often try to write code
such as
foreach (const line; File(filePath).byLine)
{
auto s = line.splitter( )
const x = s.front.to!uint; s.popFront;
const y =
On Friday, 13 February 2015 at 09:13:48 UTC, Kagamin wrote:
Whether s.front uses GC is determined by s.front
implementation, caller can't affect it.
Compiling
https://github.com/nordlow/justd/blob/master/t_splitter.d
with -vgc on dmd git master gives no warnings about GC
allocations!
Is
On Friday, 13 February 2015 at 11:34:50 UTC, Per Nordlöw wrote:
On Friday, 13 February 2015 at 09:13:48 UTC, Kagamin wrote:
Whether s.front uses GC is determined by s.front
implementation, caller can't affect it.
Compiling
https://github.com/nordlow/justd/blob/master/t_splitter.d
with -vgc
On Friday, 13 February 2015 at 13:07:04 UTC, bearophile wrote:
I suggest you to read how a marksweep GC works, or better to
implement a bare-bones marksweep GC in C language yourself for
Lisp-like cons cells, you only need 100 lines of code or so to
do it.
Got it. Thanks.
On Friday, 13 February 2015 at 12:50:14 UTC, Tobias Pankrath
wrote:
There are no reference counts involved, just simple arithmetic.
string a = abc;
string b = a[1 .. $];
Then how does the GC know when to release when there are multiple
references?
Is this because string references
On Friday, 13 February 2015 at 12:40:57 UTC, Per Nordlöw wrote:
On Friday, 13 February 2015 at 11:52:50 UTC, Tobias Pankrath
wrote:
On Friday, 13 February 2015 at 11:34:50 UTC, Per Nordlöw wrote:
On Friday, 13 February 2015 at 09:13:48 UTC, Kagamin wrote:
Whether s.front uses GC is determined
Per Nordlöw:
Then how does the GC know when to release when there are
multiple references?
The mark phase counts what's reachable and what can't be reached.
If an object has one pointer to it, or one hundred pointers, it
is not removed. If nothing points to it, it is removed.
I suggest
On Friday, 13 February 2015 at 12:58:40 UTC, Per Nordlöw wrote:
On Friday, 13 February 2015 at 12:50:14 UTC, Tobias Pankrath
wrote:
There are no reference counts involved, just simple arithmetic.
string a = abc;
string b = a[1 .. $];
Then how does the GC know when to release when there are
Tobias Pankrath:
Why should splitter.front allocate?
I think that front was able to throw Unicode exceptions, that
require the GC. But I think later they have become asserts, that
don't require the GC.
Bye,
bearophile
On Friday, 13 February 2015 at 11:52:50 UTC, Tobias Pankrath
wrote:
On Friday, 13 February 2015 at 11:34:50 UTC, Per Nordlöw wrote:
On Friday, 13 February 2015 at 09:13:48 UTC, Kagamin wrote:
Whether s.front uses GC is determined by s.front
implementation, caller can't affect it.
Compiling
12 matches
Mail list logo