LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default Array Memory Size

Hello All,

I'm hoping to find a Win32 API which will provide me the memory size
of a safe array dimmed in VBA.

Here's what I am trying to solve...

I currently calculate a moving average of the last x elements stored
within an array. Step one is to find the last element used within the
array, for which I currently use a self-written binary search. Next,
I use a Win32 api to copy the segment of memory (CopyMemory)
containing the elements I want to average into another array so that I
can execute:

Avg = Application.Average(arrayTwo)

The slowest part of this oppoeration is the binary search. So, I was
hoping to get the size of the memory used by the array and then devide
the returned value by the number of bytes per element to determin the
number of the last element used within the array. (Please note,
Ubound only gives me the upper bound of the array, not the last used
element in the array).

Any ideas??

Thanks!

Trip
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Memory and File Size Management MMcCullough Excel Discussion (Misc queries) 12 August 12th 06 01:48 AM
Memory and File Size Jim May Excel Discussion (Misc queries) 3 June 28th 06 07:44 PM
Size/memory limitations for vlookup fixed in the new Excel? Martin Miller Excel Discussion (Misc queries) 2 June 27th 06 08:49 PM
Displaying the size of the dataset currently in memory [email protected] Excel Programming 0 April 16th 06 02:45 PM
xls file size / memory errors Stuart Bazzard Excel Programming 2 April 26th 04 11:28 AM


All times are GMT +1. The time now is 09:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"