replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Copying stuff to a memory address
forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Copying stuff to a memory address

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
KennyT



Joined: 02 Aug 2005
Posts: 320

PostPosted: Wed Apr 23, 2014 3:07 pm    Post subject: Copying stuff to a memory address Reply with quote

For reasons too complicated to go into, we have a series of arrays and variables that we'd like to "get a handle to" via a single address.

We could do it by writing/reading to/from a scratch file but wondered if there was any way to do it "in memory" (for speed as much as anything else).

So, i think what I'm asking is whether there's a way to do an unformatted write/read to/from an internal "unlimited-length" character buffer...

Any thoughts/tricks appreciated!

K
Back to top
View user's profile Send private message Visit poster's website
JohnCampbell



Joined: 16 Feb 2006
Posts: 2621
Location: Sydney

PostPosted: Thu Apr 24, 2014 8:03 pm    Post subject: Reply with quote

You could try memory routines. See help for:
* Storage management routines
* Other machine-level facilities
This may help

John
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8255
Location: Salford, UK

PostPosted: Thu Apr 24, 2014 9:21 pm    Post subject: Reply with quote

See also "Extended ALLOCATE statement"
Back to top
View user's profile Send private message AIM Address
KennyT



Joined: 02 Aug 2005
Posts: 320

PostPosted: Fri Apr 25, 2014 9:44 am    Post subject: Reply with quote

Thanks for the replies, i'll take a look.

K
Back to top
View user's profile Send private message Visit poster's website
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2415
Location: Yateley, Hants, UK

PostPosted: Fri Apr 25, 2014 2:11 pm    Post subject: Reply with quote

The scratch file isn't as bad as you think, as providing you access it soon after creating and it is small enough (which is still pretty big!) it is still in the cache.

Alternatively, you can use RAMdisk software and read and write a scratch disk there.

In both cases, you are using very standard Fortran code.

If you need the information to be available to multiple programs, then you can't use an automatically-named file, you have to give it a name that all other programs 'know'.

Eddie
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2621
Location: Sydney

PostPosted: Tue Apr 29, 2014 5:31 am    Post subject: Reply with quote

If you are going to use scratch files, be warned that opening and closing the same file many times in Windows does have some known problems, as there can be delays releasing file handles when closing files.

John
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2415
Location: Yateley, Hants, UK

PostPosted: Tue Apr 29, 2014 11:03 am    Post subject: Reply with quote

I thought it might only be one file.

Some things in Windows aren't great :(

E
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group