On Monday, 21 October 2013 at 07:31:30 UTC, Ali Çehreli wrote:
On 10/20/2013 10:59 PM, Agustin wrote:
> That didn't work, but after reading how emplace works, i had
to make
> some changes.
>
> public T allocate(T : Object, A...)(auto ref A
arguments) {
> auto pMemory =
rawAllocate(
On Monday, 21 October 2013 at 11:48:11 UTC, Benjamin Thaut wrote:
Using destroy will zero the entire memory block after
destroying the object. If you are freeing the memory right
after destroying this is going to cost you performance.
To avoid this declare:
extern (C) void rt_finalize2(void*
Am 21.10.2013 04:17, schrieb Adam D. Ruppe:
On Monday, 21 October 2013 at 02:06:02 UTC, Agustin wrote:
I'm implementing some custom memory allocator, is possible to call an
object destructor directly?
destroy(object);
destroy is in the automatically imported object.dm so you don't have to
im
On 10/20/2013 10:59 PM, Agustin wrote:
> That didn't work, but after reading how emplace works, i had to make
> some changes.
>
> public T allocate(T : Object, A...)(auto ref A arguments) {
> auto pMemory = rawAllocate(__traits(classInstanceSize, T),
> T.alignof);
Does rawAllocate
On Monday, 21 October 2013 at 05:40:13 UTC, Agustin wrote:
On Monday, 21 October 2013 at 05:17:01 UTC, Jonathan M Davis
wrote:
On Monday, October 21, 2013 05:53:46 Agustin wrote:
On Monday, 21 October 2013 at 03:50:24 UTC, Agustin wrote:
> On Monday, 21 October 2013 at 03:46:33 UTC, Jonathan M
On Monday, 21 October 2013 at 05:17:01 UTC, Jonathan M Davis
wrote:
On Monday, October 21, 2013 05:53:46 Agustin wrote:
On Monday, 21 October 2013 at 03:50:24 UTC, Agustin wrote:
> On Monday, 21 October 2013 at 03:46:33 UTC, Jonathan M Davis
>
> wrote:
>> On Monday, October 21, 2013 05:07:02 A
On Monday, October 21, 2013 05:53:46 Agustin wrote:
> On Monday, 21 October 2013 at 03:50:24 UTC, Agustin wrote:
> > On Monday, 21 October 2013 at 03:46:33 UTC, Jonathan M Davis
> >
> > wrote:
> >> On Monday, October 21, 2013 05:07:02 Agustin wrote:
> >>> What about constructor?. My current code i
On Monday, 21 October 2013 at 03:46:33 UTC, Jonathan M Davis
wrote:
On Monday, October 21, 2013 05:07:02 Agustin wrote:
What about constructor?. My current code is:
T allocate(T : Object, A...)(auto ref A arguments) {
auto pMemory = rawAllocate(__traits(classInstanceSize
On Monday, 21 October 2013 at 03:50:24 UTC, Agustin wrote:
On Monday, 21 October 2013 at 03:46:33 UTC, Jonathan M Davis
wrote:
On Monday, October 21, 2013 05:07:02 Agustin wrote:
What about constructor?. My current code is:
T allocate(T : Object, A...)(auto ref A arguments) {
On Monday, October 21, 2013 05:07:02 Agustin wrote:
> What about constructor?. My current code is:
>
> T allocate(T : Object, A...)(auto ref A arguments) {
> auto pMemory = rawAllocate(__traits(classInstanceSize, T),
> T.alignof); // Return void*
>
> emplace!T(ca
On Monday, 21 October 2013 at 02:26:03 UTC, Agustin wrote:
On Monday, 21 October 2013 at 02:17:54 UTC, Adam D. Ruppe wrote:
On Monday, 21 October 2013 at 02:06:02 UTC, Agustin wrote:
I'm implementing some custom memory allocator, is possible to
call an object destructor directly?
destroy(obj
On Monday, 21 October 2013 at 02:17:54 UTC, Adam D. Ruppe wrote:
On Monday, 21 October 2013 at 02:06:02 UTC, Agustin wrote:
I'm implementing some custom memory allocator, is possible to
call an object destructor directly?
destroy(object);
destroy is in the automatically imported object.dm so
On Monday, 21 October 2013 at 02:06:02 UTC, Agustin wrote:
I'm implementing some custom memory allocator, is possible to
call an object destructor directly?
destroy(object);
destroy is in the automatically imported object.dm so you don't
have to import anything,
The source code is in dmd2/
I'm implementing some custom memory allocator, is possible to
call an object destructor directly?
For example
void deallocate(T)(T object)
{
assert(object !is null);
object.~this();
rawDeallocate(cast(void *)object);
}
14 matches
Mail list logo