What is the absolute largest arrary that I can use? 
Author Message
 What is the absolute largest arrary that I can use?

Basically I need to have 2 arrays of string that have locations for up to
2122416000 addresses( 128 x 255 x 255 x 255).

Saving them to a database is not a possibility as they need to be regurgitated
once the function has completed.

Perhaps even creating a temp file and deleting this once the values have been
spat out.

Or is there a better way of doing this??



Thu, 25 Nov 2004 15:10:13 GMT  
 What is the absolute largest arrary that I can use?
IMHO, there must be something wrong with your design...

string[ 2122416000 ] would need some GB of memory,
I guess you have to switch to 64-Bit CPUs.
(note, there is no 64-Bit .NET yet)

Most engines use indexes/hastables/search algorithms
and the likes to managed that amount of strings...

--
  NETMaster  (Thomas Scheidegger)
  http://www.cetus-links.org/oo_CSharp.html

Quote:

> Basically I need to have 2 arrays of string that have locations for up to
> 2122416000 addresses( 128 x 255 x 255 x 255).
> Saving them to a database is not a possibility as they need to be regurgitated
> once the function has completed.
> Perhaps even creating a temp file and deleting this once the values have been
> spat out.



Thu, 25 Nov 2004 17:58:13 GMT  
 What is the absolute largest arrary that I can use?

Quote:
> IMHO, there must be something wrong with your design...

Using a subnet mask of 128.0.0.0 on most IP gives that many possible IP address.

I have decided to use a temp file for this option.  The only problem is, I
cannot find any examples using text files with unknown content etc.

Basically the file format looks like:
192.168.200.1     system0
192.168.200.200     system1
192.168.200.201     system2

Unless I pad the string, is there some way of reading this with the offset and
lengths are unknown?

Quote:
> string[ 2122416000 ] would need some GB of memory,
> I guess you have to switch to 64-Bit CPUs.
> (note, there is no 64-Bit .NET yet)

I am saving my pennies for a 64bit Wintel chip :-)

Quote:
> Most engines use indexes/hastables/search algorithms
> and the likes to managed that amount of strings...

> --
>   NETMaster  (Thomas Scheidegger)
>   http://www.cetus-links.org/oo_csharp.html




Quote:
> > Basically I need to have 2 arrays of string that have locations for up to
> > 2122416000 addresses( 128 x 255 x 255 x 255).
> > Saving them to a database is not a possibility as they need to be
regurgitated
> > once the function has completed.
> > Perhaps even creating a temp file and deleting this once the values have
been
> > spat out.



Thu, 25 Nov 2004 18:20:25 GMT  
 What is the absolute largest arrary that I can use?
Hm, you DO realize that the first part of your data is NOT a string but an
IP Address and can be encoded in a 32 bit value? Which, btw, is also way
faster to check?

You try to build a database of IP addresses - PLEASE refrain from keeping
them in momeory - no need. Use a database :-)

--
Regards

Thomas Tomiczek
THONA Consulting Ltd.
(Microsoft MVP C#/.NET)


Quote:


> > IMHO, there must be something wrong with your design...

> Using a subnet mask of 128.0.0.0 on most IP gives that many possible IP
address.

> I have decided to use a temp file for this option.  The only problem is, I
> cannot find any examples using text files with unknown content etc.

> Basically the file format looks like:
> 192.168.200.1     system0
> 192.168.200.200     system1
> 192.168.200.201     system2

> Unless I pad the string, is there some way of reading this with the offset
and
> lengths are unknown?

> > string[ 2122416000 ] would need some GB of memory,
> > I guess you have to switch to 64-Bit CPUs.
> > (note, there is no 64-Bit .NET yet)

> I am saving my pennies for a 64bit Wintel chip :-)

> > Most engines use indexes/hastables/search algorithms
> > and the likes to managed that amount of strings...

> > --
> >   NETMaster  (Thomas Scheidegger)
> >   http://www.cetus-links.org/oo_csharp.html



> > > Basically I need to have 2 arrays of string that have locations for up
to
> > > 2122416000 addresses( 128 x 255 x 255 x 255).
> > > Saving them to a database is not a possibility as they need to be
> regurgitated
> > > once the function has completed.
> > > Perhaps even creating a temp file and deleting this once the values
have
> been
> > > spat out.



Thu, 25 Nov 2004 18:27:56 GMT  
 What is the absolute largest arrary that I can use?


Quote:
> Hm, you DO realize that the first part of your data is NOT a string but an
> IP Address and can be encoded in a 32 bit value? Which, btw, is also way
> faster to check?

> You try to build a database of IP addresses - PLEASE refrain from keeping
> them in momeory - no need. Use a database :-)

I am looking for some samples of creating the DB, but most of what I have seen
so far, assumes the DB already exists.  Do you have a link to a site that deals
with the creation of DBs?


Thu, 25 Nov 2004 20:28:51 GMT  
 What is the absolute largest arrary that I can use?
Well, sure. Pretty easy. Though you propably might want to use a
professional DB.

For an access db (up to 2 Gb again) you can use DAO to create it - look up
the API in the documentation :-)

--
Regards

Thomas Tomiczek
THONA Consulting Ltd.
(Microsoft MVP C#/.NET)


Quote:


> > Hm, you DO realize that the first part of your data is NOT a string but
an
> > IP Address and can be encoded in a 32 bit value? Which, btw, is also way
> > faster to check?

> > You try to build a database of IP addresses - PLEASE refrain from
keeping
> > them in momeory - no need. Use a database :-)

> I am looking for some samples of creating the DB, but most of what I have
seen
> so far, assumes the DB already exists.  Do you have a link to a site that
deals
> with the creation of DBs?



Thu, 25 Nov 2004 20:51:13 GMT  
 What is the absolute largest arrary that I can use?
If you want to programmatically create an .mdb file (MS Access database) you
can use the methods described at this link:

http://www.pstruh.cz/tips/detpg_createmdb.htm

You do not need the commercial Access product to do this (from a practical
or legal standpoint) but you should have the OLE DB provider installed,
which should be the case if .NET RTM is installed.

You'll then have to use ADOX (search for it on MSDN) to create table objects
etc.

Richard


Quote:


> > Hm, you DO realize that the first part of your data is NOT a string but
an
> > IP Address and can be encoded in a 32 bit value? Which, btw, is also way
> > faster to check?

> > You try to build a database of IP addresses - PLEASE refrain from
keeping
> > them in momeory - no need. Use a database :-)

> I am looking for some samples of creating the DB, but most of what I have
seen
> so far, assumes the DB already exists.  Do you have a link to a site that
deals
> with the creation of DBs?



Fri, 26 Nov 2004 09:05:37 GMT  
 What is the absolute largest arrary that I can use?
IIRC you can also build a text DB with the ADO class.  If your searching
sequentially, this may not be a bad way to go, if random, then something
like MS Access or SQL should be in your future.

--
William Stacey, MCSE
Windows Server MVP


Quote:


> > Hm, you DO realize that the first part of your data is NOT a string but
an
> > IP Address and can be encoded in a 32 bit value? Which, btw, is also way
> > faster to check?

> > You try to build a database of IP addresses - PLEASE refrain from
keeping
> > them in momeory - no need. Use a database :-)

> I am looking for some samples of creating the DB, but most of what I have
seen
> so far, assumes the DB already exists.  Do you have a link to a site that
deals
> with the creation of DBs?



Sat, 27 Nov 2004 06:15:04 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. Beginner [Q] Using Canned File Open/Save dialog

2. absolute newbie: Using parameters

3. How to find absolute PIDLs using ParseDisplayName?

4. Building a dynamic byte arrary

5. use integer arrary pointer with initial value

6. arrary (struct) allocation differs

7. Converting char arrary to short

8. Determining what canned preprocessor symbols are available

9. Help with compiling a "canned" program

10. Canned Dialogs

11. C# , i am trying to create a file on the server using C#

12. Am I using realloc() incorrectly?

 

 
Powered by phpBB® Forum Software