s-news
[Top] [All Lists]

Memory problem in DLL?

To: <s-news@lists.biostat.wustl.edu>
Subject: Memory problem in DLL?
From: "Yingfu Xie" <Yingfu.Xie@sekon.slu.se>
Date: Fri, 18 Feb 2005 09:52:11 +0100
Keywords: disclaimer
Thread-index: AcUVlyKIfPlwOohrRlWiOQ++S/GvZQ==
Thread-topic: Memory problem in DLL?
Hello, dear list members,

I wrote a simple C code to get a matrix and list from S-plus, carry out
some calculation and return the result to S-plus. (I use .C routine and
only head file S.h is involved.) The main purpose is to speed up the
computation. It works.

Now the problem is: when our data are just of moderate size, it refuses
to work any more. To be specific, our list is fixed and it has 109
elements which are matrix with 16 columns and 1~180 rows. The matrix has
12 columns. In my PC, when the matrix has more than 1050 rows, the .C()
will always keep silence, just silence, and S-plus session is alive.

Since the data are really not big, I doubt it is a memory problem with
S-plus. Using Task Manager to track, S-plus never use much memory. So I
suspect maybe the memory used by the DLL is limited by S-plus in this
case, is it? Can any kind-heart tell me where I can find any information
for this and/or how to change it if it is possible? Is it machine or
compiler specified?

I searched our archive and found quite a lot similar posts from late
1990s; none of them had a clear answer. I really appreciate any hints
and efforts you make!

My PC: P4 1.6G, 128M RAM; Windows 2000; S-plus6.2; Compiler: gcc 3.2.3
(mingw special 20030504-1)

Thank you,
Yingfu

Ps. I previous sent my post with my data attached, but it seems fail to
go through the firewall. Now, I attached a test example for those of you
who are interested, with the DLL and an S-plus script given, where the
matrix data can be set as following:
rows<-3000 ##varying length of row
thematrix<-matrix(runif(rows*12),nc=12,nr=rows)

In my test, it refuses to work when using more than 1064 rows of
thematrix.
Thank you again!
###########################################

This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange.
For more information, connect to http://www.f-secure.com/

Attachment: test.SSC
Description: test.SSC

Attachment: classify5bild2.dll
Description: classify5bild2.dll

<Prev in Thread] Current Thread [Next in Thread>