Re: Specify the type but not number of function arguments in an interface?

2009-07-05 Thread Jarrett Billingsley
On Sun, Jul 5, 2009 at 5:44 AM, downs wrote: > Doctor J wrote: >> I want to write an interface that expresses the following idea: "classes >> implementing this interface must have a void function named update, with a >> fixed but indeterminate number of parameters of the same (template >> parame

Re: How to release memory? (D2.0.30)

2009-07-05 Thread BCS
Hello Jérôme, Like BCS said, the only way to make sure that the memory will be returned is to use mmap/munmap directly (or their equivalent on your platform). That maybe true, but it wasn't my point. What I was trying to get at was that if you want to load a file into a buffer then asking mma

Re: How to release memory? (D2.0.30)

2009-07-05 Thread Tom S
AxelS wrote: @downs: That's what I even had beforejust allocate and release memory is not difficult - just if you want to access the data the GC copies all the memory into its heap... Can you recommend a good crack dealer? ;) Seriously, there are no GC calls associated with memory acces

Re: How to release memory? (D2.0.30)

2009-07-05 Thread Jérôme M. Berger
downs wrote: BCS wrote: Hello AxelS, BCS Wrote: You can't. The D runtime (and most other runtimes) don't ever reduce the amount of memory they keep in the heap. If you where to allocate another 25MB right after that function you would see no change in the memory usage. The good news is that

Re: How to release memory? (D2.0.30)

2009-07-05 Thread AxelS
@downs: That's what I even had beforejust allocate and release memory is not difficult - just if you want to access the data the GC copies all the memory into its heap... I found a new way which is really good and easy: Just use the Win32 Memory API for allocating and releasing your data wi

Re: Cross-references in ddoc

2009-07-05 Thread Jacob Carlborg
On 7/4/09 6:35 PM, Ary Borenszweig wrote: I've seen both Tango and phobos documentation and it's really hard to navigate. Consider this: class HttpPost { void[] write(Pump pump) } Pump has no link on it. I can't tell what Pump is. I can see the source code (in the web page) invokes super.writ

Re: How to release memory? (D2.0.30)

2009-07-05 Thread downs
BCS wrote: > Hello AxelS, > >> BCS Wrote: >> >>> You can't. The D runtime (and most other runtimes) don't ever reduce >>> the amount of memory they keep in the heap. If you where to allocate >>> another 25MB right after that function you would see no change in the >>> memory usage. The good news i

Re: Specify the type but not number of function arguments in an interface?

2009-07-05 Thread downs
Doctor J wrote: > I want to write an interface that expresses the following idea: "classes > implementing this interface must have a void function named update, with a > fixed but indeterminate number of parameters of the same (template parameter) > type." Use a typesafe variadic function, i.e