Big thank.
Switch to /bin64 and now works until full memory using.
My guess is you are compiling to 32bit and the GC tries to
reserve >4gb wich it can't, therefore out of memory
Compiling to 64bit with: `dmd -m64 -run test.d` works no problem
On Wednesday, 24 February 2021 at 06:14:58 UTC, Imperatorn wrote:
On Tuesday, 23 February 2021 at 19:44:39 UTC, David wrote:
Not sure if `learn` is the right topic or not to post this..
I've been going through Bob Nystrom's "Crafting Interpreters"
for a bit of fun and over the weekend put toge
On Tuesday, 23 February 2021 at 19:44:39 UTC, David wrote:
Not sure if `learn` is the right topic or not to post this..
I've been going through Bob Nystrom's "Crafting Interpreters"
for a bit of fun and over the weekend put together a toy
allocator in D - free and gc not yet done. It's single
On Saturday, 13 July 2019 at 06:25:37 UTC, Andrey wrote:
On Tuesday, 9 July 2019 at 19:04:53 UTC, Max Haughton wrote:
Is this a 64 or 32 bit compiler? Also could you post the
source code if possible?
You could try "--DRT-gcopt=profile:1" druntime flag to see if
the compiler is running out of
On Tuesday, 9 July 2019 at 19:04:53 UTC, Max Haughton wrote:
Is this a 64 or 32 bit compiler? Also could you post the source
code if possible?
You could try "--DRT-gcopt=profile:1" druntime flag to see if
the compiler is running out of memory for real
Thanks for help. I solved my issue by re
Is this a 64 or 32 bit compiler? Also could you post the source
code if possible?
You could try "--DRT-gcopt=profile:1" druntime flag to see if the
compiler is running out of memory for real
On Tuesday, 9 July 2019 at 17:59:24 UTC, Max Haughton wrote:
On Tuesday, 9 July 2019 at 17:48:52 UTC, Andrey wrote:
Hello,
I have got a problem with compile-time calulations.
I have some code generator that should create some long string
of code during CT and after generation I mixin it. If I r
On Tuesday, 9 July 2019 at 17:59:24 UTC, Max Haughton wrote:
On Tuesday, 9 July 2019 at 17:48:52 UTC, Andrey wrote:
I in addition wrote "buffer.reserve(10 * 1014 * 1024);" and it
also doesn't help.
On Tuesday, 9 July 2019 at 17:48:52 UTC, Andrey wrote:
Hello,
I have got a problem with compile-time calulations.
I have some code generator that should create some long string
of code during CT and after generation I mixin it. If I run it
normally - in run time - then there is no error and I g
On Thursday, 30 March 2017 at 11:22:05 UTC, Gary Willoughby wrote:
On Wednesday, 29 March 2017 at 19:19:48 UTC, Enigma wrote:
I have a memory buffer allocated using different methods. It
is simply a pointer and a size.
I would like to be able to manage this buffer by treating it
as a memory p
On Wednesday, 29 March 2017 at 23:26:04 UTC, H. S. Teoh wrote:
On Wed, Mar 29, 2017 at 11:01:12PM +, Enigma via
Digitalmars-d-learn wrote:
On Wednesday, 29 March 2017 at 21:36:14 UTC, Petar Kirov
[ZombineDev] wrote:
> [...]
But these seem to require passing a mallocator. I simply want
to
On Wednesday, 29 March 2017 at 19:19:48 UTC, Enigma wrote:
I have a memory buffer allocated using different methods. It is
simply a pointer and a size.
I would like to be able to manage this buffer by treating it as
a memory pool or heap. I think I can use allocators to do this
but not sure h
On Wed, Mar 29, 2017 at 11:01:12PM +, Enigma via Digitalmars-d-learn wrote:
> On Wednesday, 29 March 2017 at 21:36:14 UTC, Petar Kirov [ZombineDev] wrote:
> > On Wednesday, 29 March 2017 at 19:19:48 UTC, Enigma wrote:
> > > [...]
> >
> > It looks like you are looking for this:
> > http://dlang
On Wednesday, 29 March 2017 at 21:36:14 UTC, Petar Kirov
[ZombineDev] wrote:
On Wednesday, 29 March 2017 at 19:19:48 UTC, Enigma wrote:
[...]
It looks like you are looking for this:
http://dlang.org/phobos-prerelease/std_experimental_allocator_building_blocks_region.html.
But these seem to
On Wednesday, 29 March 2017 at 19:19:48 UTC, Enigma wrote:
I have a memory buffer allocated using different methods. It is
simply a pointer and a size.
I would like to be able to manage this buffer by treating it as
a memory pool or heap. I think I can use allocators to do this
but not sure h
On 2017-03-29 23:30, Faux Amis wrote:
On 2017-03-29 21:19, Enigma wrote:
I have a memory buffer allocated using different methods. It is simply a
pointer and a size.
Can you maybe just tread it like an array and slice it for allocation?
*treat*
On 2017-03-29 21:19, Enigma wrote:
I have a memory buffer allocated using different methods. It is simply a
pointer and a size.
Can you maybe just tread it like an array and slice it for allocation?
On Tuesday, 22 November 2016 at 15:53:39 UTC, Steven
Schveighoffer wrote:
On 11/21/16 11:53 AM, ag0aep6g wrote:
Thank you very much for explaining such a difficult and slippery
situation.
On 11/21/16 11:53 AM, ag0aep6g wrote:
On Monday, 21 November 2016 at 16:37:32 UTC, Kagamin wrote:
Anything in .data and .bss sections and stack. See
https://issues.dlang.org/show_bug.cgi?id=15723
Ok, not an actual reference then, but a false pointer.
Yes. 100 million bytes is 1/40 of all add
On Sunday, 20 November 2016 at 17:47:50 UTC, MGW wrote:
core.exception.OutOfMemoryError@src\core\exception.d(693):
Memory allocation failed
Simple program and error. Why? Windows 7 (32) dmd 2.072.0
Making a 100 million bytes array by appending one byte at
On Monday, 21 November 2016 at 16:37:32 UTC, Kagamin wrote:
Anything in .data and .bss sections and stack. See
https://issues.dlang.org/show_bug.cgi?id=15723
Ok, not an actual reference then, but a false pointer.
On Monday, 21 November 2016 at 11:22:40 UTC, ag0aep6g wrote:
Who could "someone" be? It's a self-contained example, and buf
doesn't leave the test function.
Anything in .data and .bss sections and stack. See
https://issues.dlang.org/show_bug.cgi?id=15723
As for GC compaction:
https://issues
On 11/21/2016 08:27 AM, Stefan Koch wrote:
Someone could still be hanging on to an old Reference of buf.
Who could "someone" be? It's a self-contained example, and buf doesn't
leave the test function.
On Monday, 21 November 2016 at 06:45:04 UTC, ag0aep6g wrote:
On 11/21/2016 07:36 AM, Stefan Koch wrote:
On Monday, 21 November 2016 at 03:58:00 UTC, MGW wrote:
On Sunday, 20 November 2016 at 18:58:04 UTC, Basile B. wrote:
On Sunday, 20 November 2016 at 17:47:50 UTC, MGW wrote:
[...]
[...]
Y
On 11/21/2016 07:36 AM, Stefan Koch wrote:
On Monday, 21 November 2016 at 03:58:00 UTC, MGW wrote:
On Sunday, 20 November 2016 at 18:58:04 UTC, Basile B. wrote:
On Sunday, 20 November 2016 at 17:47:50 UTC, MGW wrote:
import core.sys.windows.windows: MessageBoxA;
void test() {
for(int i; i
On Monday, 21 November 2016 at 03:58:00 UTC, MGW wrote:
On Sunday, 20 November 2016 at 18:58:04 UTC, Basile B. wrote:
On Sunday, 20 November 2016 at 17:47:50 UTC, MGW wrote:
import core.sys.windows.windows: MessageBoxA;
void test() {
for(int i; i != 10; i++) {
ubyte[] b
On Sunday, 20 November 2016 at 18:58:04 UTC, Basile B. wrote:
On Sunday, 20 November 2016 at 17:47:50 UTC, MGW wrote:
import core.sys.windows.windows: MessageBoxA;
void test() {
for(int i; i != 10; i++) {
ubyte[] buf;
for(int j; j != 1; j++) buf ~
On Sunday, 20 November 2016 at 18:58:04 UTC, Basile B. wrote:
On Sunday, 20 November 2016 at 17:47:50 UTC, MGW wrote:
[...]
For me there's no exception. Maybe the GC is poluted. Try to
add this after each iteration in the first test loop:
import core.memory: GC;
GC.collect()
On Sunday, 20 November 2016 at 17:47:50 UTC, MGW wrote:
import core.sys.windows.windows: MessageBoxA;
void test() {
for(int i; i != 10; i++) {
ubyte[] buf;
for(int j; j != 1; j++) buf ~= 65;
MessageBoxA(null, "--on for--".ptr, "".pt
On Thu, 11 Nov 2010 07:42:36 -0500, Steven Schveighoffer
wrote:
On Wed, 10 Nov 2010 23:33:58 -0500, Xie wrote:
OK, this actually makes sense to me.
It's a manifestation of this issue:
http://d.puremagic.com/issues/show_bug.cgi?id=3929
I'm think - it's truth but not at all.
Sorry, but
On Wed, 10 Nov 2010 23:33:58 -0500, Xie wrote:
OK, this actually makes sense to me.
It's a manifestation of this issue:
http://d.puremagic.com/issues/show_bug.cgi?id=3929
I'm think - it's truth but not at all.
Sorry, but i'm give incomplete data.
My example run fine, when benchmark(1), (
>OK, this actually makes sense to me.
>It's a manifestation of this issue:
>http://d.puremagic.com/issues/show_bug.cgi?id=3929
I'm think - it's truth but not at all.
Sorry, but i'm give incomplete data.
My example run fine, when benchmark(1), (2), but not 10.
This means, that memory not collect
On Wed, 10 Nov 2010 14:38:02 -0500, Xie wrote:
Sorry, it a mistypo (i began from wchar[], later changed to wstring)
Real problem can be seen here
import std.stdio;
import std.date;
void f0()
{
wstring a;
foreach(i; 0 .. 100_000_000)
{
a ~= " "w;
Sorry, it a mistypo (i began from wchar[], later changed to wstring)
Real problem can be seen here
import std.stdio;
import std.date;
void f0()
{
wstring a;
foreach(i; 0 .. 100_000_000)
{
a ~= " "w;
}
}
void main()
{
auto r = benchmark!(f
On Wed, 10 Nov 2010 14:06:40 -0500, Steven Schveighoffer
wrote:
Just tried it, Appender is actually slower. This *is* a problem, it
should be way faster than builtin array appending.
I will look into it.
More data, Appender taking an array of elements is significantly slower
than taki
On Wed, 10 Nov 2010 13:55:26 -0500, sybrandy wrote:
On 11/10/2010 11:33 AM, Xie wrote:
Can't run a simple program. What's wrong, GC?
import std.stdio;
import std.date;
void f0()
{
wstring a[];
foreach(i; 0 .. 100_000_000)
{
a ~= " "w;
}
}
voi
On 11/10/2010 11:33 AM, Xie wrote:
Can't run a simple program. What's wrong, GC?
import std.stdio;
import std.date;
void f0()
{
wstring a[];
foreach(i; 0 .. 100_000_000)
{
a ~= " "w;
}
}
void main()
{
auto r = benchmark!(f0)(1);
On Wed, 10 Nov 2010 13:33:11 -0500, Steven Schveighoffer
wrote:
On Wed, 10 Nov 2010 11:33:45 -0500, Xie wrote:
Can't run a simple program. What's wrong, GC?
import std.stdio;
import std.date;
void f0()
{
wstring a[];
foreach(i; 0 .. 100_000_000)
{
On Wed, 10 Nov 2010 11:33:45 -0500, Xie wrote:
Can't run a simple program. What's wrong, GC?
import std.stdio;
import std.date;
void f0()
{
wstring a[];
foreach(i; 0 .. 100_000_000)
{
a ~= " "w;
}
}
void main()
{
auto r = benchmark!(f0
On Wednesday, November 10, 2010 08:33:45 Xie wrote:
> Can't run a simple program. What's wrong, GC?
>
> import std.stdio;
> import std.date;
>
> void f0()
> {
> wstring a[];
>
> foreach(i; 0 .. 100_000_000)
> {
> a ~= " "w;
> }
> }
>
> void main()
> {
>
41 matches
Mail list logo