Stack Or Heap

Hi I am new to Java Tecnology .If Someone can help me with this thing .
Where is the Array will be stored during memory allocation .In the Heap or Stack .
What will Happen If the Arrsy is for example ,of int type .
Any Answer will be appericiated .
THANKS

But since Array is under util package why dont we have
to import it while using it .You don't have to import a class to use it. The reason for importing is so that you can refer to a class without using the package name. If you fully qualify all classes, you never have to import at all!
Is it has to do something to heap or stack Again No, importing or packages have absolutely nothing to do with what's on the stack or heap. Objects are always in the heap, and local variables are always on the stack.

Similar Messages

  • When you create an object in SAP's JAVA, does it go on stack or heap?

    When you create an object in SAP's JAVA, does it go on stack or heap?
    Or somewhere else ?
    Thanks

    Simple answer is ..
    Object references go to stack
    the object(instance variable etc) go to heap.
    Hope this answered your question.
    Please award points for useful answers.

  • Difference between Stack and Heap?

    Are Java objects created on stack or heap?
    What's the difference?

    Stack
    *this lives in the general RAM.
    *this is an extremly fast and efficient way to allocate storage.
    *it has direct support from the processors via stack pointer.
    *while it is creating the program exact size and lifetime of all the datathat is stored on the                   stack.
    Heap
    *this is a general purpose pool of memory(also in the RAM).
    *thus there is a great deal of flexiblity in using storage on the heap.
    *it takes more time to allocate heap storage.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Stack and heap

    What is the difference between stack and heap?

    can we locate the address for heapYes, but you shouldn't want, don't need to and should not even thinking about it.
    A key feature of Java is that you don't use addresses, don't need to worry about them and should aviod using them as they are considered dangerous.
    Java is not like C or machine language and addresses are not a concept which is relevent to Java.
    The closest concept is a reference to an Object. Its actual address is not improtant and can change while the program is running. (In fact it can change every time the garbage collector runs)

  • Where do you store local final vaiable in? Stack or Heap or else?

    Hi all,
    I know local variables are stored in the stack, but how about local final variables? Are they stored in the stack too? What are their life times? Do they "die" with the method after the method is finished?
    class Example{
    void doStuff() {
    final String z = "local variable";
    Where is z stored? Is it gone when doStruff() is finished?
    Thanks a lot

    davy_wei wrote:
    Thanks DrClap, but it's not the answer to my question.Yes, it was. You asked where final local variables are stored and DrC gave you the correct answer--all local variables, whether final or not, are on the stack. He answered the question you asked.
    >
    See the complete example,
    class Example {
    private String x="Outer";
    void doStuff() {
    String x="local variable";
    class InnerClass {
    public void exampleMethod() {
    System.out.println("x is "+x);
    System.out.println("Local variable x is "+x);
    MyInner mi=new InnerClass();
    mi.doStuff();
    otherMethodInTheExample(mi);    // you can pass the reference of mi to other method
    }You are not able to compile it because the virable x is local. The InnerClass can not access the local variables in the enclosing method, which is doStuff(). Before even after the method completes, the inner class object mi might still be alive on the heap if the method otherMethodInTheExample() store the reference in an instance variable. That's the reason why InnerClass can not access the local variable x.
    However, if we change the local variable x to final, the code can compile and work.The local variable is still stored on the stack. However, since is value is known and known not to change before the inner class gets it, the inner class can get a copy of its value. This would not work if it were non-final.
    Now I have the question. Why the InnerClass can access x when it is set to final. Is x store in the heap too?The inner class gets its own copy of the variable. Since its value is final, it's okay to have multiple copies floating around, since it's impossible for them to get out of sync.

  • Java variables can they reference storage alocated in stack or heap

    1- In Java can a variable of class type reference storage allocated on the call stack?
    2- In Java can a variable of class type reference storage allocated on the call heap?

    1- In Java can a variable of class type reference storage allocated on the call stack?
    2- In Java can a variable of class type reference storage allocated on the call heap?

  • Stack vs heap

    what is the difference? How r they handled in Java?
    Thanks

    The Java stack and related registers
    The Java stack is used to store parameters for and results of bytecode instructions, to pass parameters to and return values from methods, and to keep the state of each method invocation. The state of a method invocation is called its stack frame. The vars, frame, and optop registers point to different parts of the current stack frame.
    There are three sections in a Java stack frame: the local variables, the execution environment, and the operand stack. The local variables section contains all the local variables being used by the current method invocation. It is pointed to by the vars register. The execution environment section is used to maintain the operations of the stack itself. It is pointed to by the frame register. The operand stack is used as a work space by bytecode instructions. It is here that the parameters for bytecode instructions are placed, and results of bytecode instructions are found. The top of the operand stack is pointed to by the optop register.
    The execution environment is usually sandwiched between the local variables and the operand stack. The operand stack of the currently executing method is always the topmost stack section, and the optop register therefore always points to the top of the entire Java stack.
    The garbage-collected heap
    The heap is where the objects of a Java program live. Any time you allocate memory with the new operator, that memory comes from the heap. The Java language doesn't allow you to free allocated memory directly. Instead, the runtime environment keeps track of the references to each object on the heap, and automatically frees the memory occupied by objects that are no longer referenced -- a process called garbage collection.
    http://www.javaworld.com/javaworld/jw-06-1996/jw-06-vm-p2.html

  • FREED STACK and TRef Type

    Hi,
    I've created a variant to load select-options data from database like you can see in this document:
    /people/sharad.agrawal/blog/2008/08/26/creating-and-using-variant-in-select-options-with-web-dynpro-for-abap-3
    All runs perfectly but when I try to get the data inside the handle method of the main view, but when I read the parameters attribute of WDEVENT it comes with "FREED STACK" and I can access to the information. After, a dump fetchs inside the class CL_WDR_SELECT_OPTIONS and it is GETWA_NOT_ASSIGNED type. Does anybody know anything about this?
    Thank you very much.

    Hi Sundar,
    I found this link very useful in understanding the concept behind Stack and Heap.
    Should be useful for you as well, its answers all your doubts with pictorial representation.
    Stack, heap, Value
    types, Reference types, boxing, and unboxing
    Six important .NET concepts:
    Stack, heap, value types, reference types, boxing, and unboxing
    Here's a pretty friendly explanation: C#
    Heap(ing) Vs Stack(ing) in .NET
    Nice youtube video around the same .NET Stack and Heap
    Rachit 
    Please mark as answer or vote as helpful if my reply does

  • "Segmentation fault" while running code, how can I increase the stack size?

    Hi, I only have very limited knowledge about c+ codes and compiling them and I would be very happy if someone can assist me.
    My problem: I have two c++ codes, one with an array size of ~100,000, the other with ~1,500,000. When I compile them using terminal g++ -o commands, the smaller one works with no problem (it takes less than a minute to run), the larger one gives "Segmentation fault". I think it is a memory allocation problem and I am not an expert on dynamic memory allocation which I want to avoid for now.
    My question: When I compile the large code in Windows Visual Basic, I can go to settings to increase the stack and heap sizes and it does work. Is there a similar thing in OS X Leopard? I found some commands to do that in the terminal window but I wasn't able to resolve my problem.
    Thanks for all your help.

    Thanks for the link, I actually looked for a developer discussion group but was not able to find it through the main discussion page. I reposted to my question there.

  • Java on Stack

    C++ can put the object on stack or heap and object in Java must put on heap.
    However, if I really want to put the object on the stack, is there any method available?
    On the other hand, is any program can monitor the memory loacation when stepping a Java Program?

    However, if I really want to put the object on the stack, is there any method available?No.
    On the other hand, is any program can monitor the memory loacation when stepping a Java Program? You can always run a standard debugger and figure out where it is. Not a very good idea however, as it can move.

  • What is virtual limit of Java?

    I hadn't actually tested the memory limitations of the jvm before and I was taking the word of others (and I didn't have access to Sun boxes always either.) So I decided to test the limits today.
    Windows:
    -NT
    -1.0 gig memory limit (512 physical, 512 virtual)
    -Jdk build 1.3.1-b24
    Using only option "-Xmx" and a 'hello world' program I run into a limit at 1649m, 1648m works and 1649m doesn't.
    Solaris:
    -2.7
    -750m total memory (512m physical)
    -Jdk build 1.3.1-b24
    I run into a limit at 3957m, 3956m works.
    When I exceed the limit I get this message when the jvm is started.
    "Could not reserve enough space for object heap"
    I would like to confirm those numbers with others and see if the numbers vary with different OSes and jvm versions.
    So if you have any useful information to contribute please do.

    vickyk said
    I would like to clarify the difference between the following :
    1)Heap Memmory
    2)Stack Memory
    3)Actual Ram
    i had read in some sources that heap and stack are
    a part of the ram.Well that isn't true. In all modern OSes (precluding real time) stack and heap are part of the process space which is all mapped into virtual memory. When actually running all virtual memory is loaded into physical memory (ram.) But in any substantial application the heap is one of the most likely things to be swapped to the hard drive.
    And it helps to be clear which heap and stack you are talking about. When you run a JVM there are TWO different types of stack/heap. One is for the process and is supplied by the operating system to the executable. The second kind is provided by the JVM and is used by the running byte codes. The two types are not the same.
    In Mastering Java it has been mentioned how the heap and
    stack work.The heap does
    contain the references of the object and the instances
    are stored in stack.Huh? Parameter references and local references are on the stack. Class references (static or not) are on the heap with the rest of the object data. An 'instance' should be deemed to be the real object and that will always be on the heap, it will never be on the stack.
    Once I set the initial heap more than the actual total ram doesnot the OS give
    the excess asked from the
    hard disk or from some other form.If it doesnot give then
    how for the process you can set heap size more than
    the actual ram available?No.
    When you specify the maximum that is how much it might ask for, not how much it gets on start up. If you specify the minimum then that is asked for on start up.
    The analysis done with setting the maximum heap size
    gave the following results:
    Case 2:
    java -Xmx1674m Ora is the maximum results
    Case1:
    Oops here I am getting amzing results????
    java -Xmx8m Ora works
    java -Xmx1468 Ora gives Error
    java -Xmx12468 Ora works fineIn the second case you exceeded the internal maximum for the JVM. It will not let you go over that limit.
    Is specifying these parameters keep the range of the
    memory give to the JVM(process)?What is the default
    value given to the maximum Java heap Size.See the java docs for your particular jvm. For Sun 1.2/1.3 it is 64meg.
    Is the java heap the amount of memory requested by the java process (from the os)
    invoked.If the allocation exceed in that process does the Jvm tells you dont have
    more memory.If you exceed the maximum then java will produce an out of memory exception. Keep in mind the following:
    -The maximum is not exact. The out of memory exception can be produced when less than 64 meg is used. This is due to the way garbage collection works. The subject is complicated and if you want to know more then search this forum for topics about the garbage collector.
    -Keep in mind that the java heap is not the same as how much memory the JVM will consume. So even if the maximum is 64 meg you might use an OS tool which says it is using more. Because the OS tool tells you the total memory being used which includes the JVM code, the executable heap and stack and the jvm stack and heap.
    Usually I run the application without specifying the limit
    and I believe a bad code can let the entire system hog,but if the java heap
    range is given only the java process will get held up and the other processes
    can run.Please correct the analysisBottlenecks are not only caused by memory contention. You can write a java app that uses very little memory but totally consumes the CPU and this will tend to slow the box. There are other possible bottle necks.

  • September 2014 TechNet Guru SSAS Winners announced!

    The September Guru results are posted!
    http://blogs.technet.com/b/wikininjas/archive/2014/10/16/the-microsoft-technet-guru-awards-september-2014.aspx
    Below are the highlights, just the medal winners. Please see the blog above for more entrants and comments, which had to be trimmed to fit into this 60,000 character forum limit. 
     BizTalk Technical Guru - September 2014  
    Johns-305 [boatseller]
    BizTalk: Working with Preserve Interchange EDI Xml – Part 1
    Mandi Ohlinger: "This is a great How To article with the steps and terms clearly defined. If you want to preserve interchanges, you need to read this."
    TGN: "EDI is a big part of BizTalk, great wrap up, both articles."
    Verma.Sumit
    BizTalk Server - Default Pipelines
    TGN: "Very nice article explaining the default pipelines "in-depth"."
    Mandi Ohlinger: "Great detailed information on the XML pipelines. Very informative read. " 
    Rahul_Madaan
    BizTalk Server - Debatching multiple message types using Envelope Schema
    Mandi Ohlinger: "A common task explained simply. Very effective."
    TGN: "Very nice tutorial. I would love to see some better images though, and a little better elaboration on the different steps, but overall a very good article." 
     Exchange Server Technical Guru - September 2014  
    Rafael Mantovani
    Exchange: Unable to Verify Information About Users Availability
    Ed Price: "This is a good article with some good images. This article was originally in English, but because it was posted on the Portuguese Wiki, it got translated into Portuguese! The English version should be pasted
    into a new article on the English Wiki. Here is the English version: http://social.technet.microsoft.com/wiki/pt-br/contents/articles/26759.nao-e-possivel-verificar-informacoes-de-disponibilidade-dos-usuarios/revision/7.aspx "
     Forefront Identity Manager Technical Guru - September 2014  
    Eihab Isaac (MVP)
    FIM 2010 R2: Coexistence Exchange Provisioning Scenario using PowerShell
    Management Agent
    AM: "Eihab, thank you for continuing to make excellent contributions to the community. This is a useful reference for anyone needing to meet similar requirements without the service and portal."
    PG: "Nice article. Well designed!"
    Søren Granfeldt: "Great overview on real world challenges with managing diffrent Exchange versions using FIM. Second part wil really complement this article."
     Microsoft Azure Technical Guru - September 2014  
    Chervine
    Predictive Analytics with Microsoft Azure Machine Learning
    JH: "Love it! One of my favorite articles on the wiki from last month."
    Ed Price: "Fantastic article! Incredibly well written with good details and helpful images. This Machine Learning topic is very important and timely right now!"
    Alex Mang
    What Are Scoring Profiles In Azure Search?
    JH: "Alex has done a tremendous job with his library. Love it that he shares update on the library on the wiki."
    Ed Price: "Wow, I love all the explanations and detail. And this topic is incredibly valuable. Amazing job!"
    saramgsilva
    Microsoft’s Windows App Studio Beta : Connecting a Menu App to Azure Mobile Service
    JH: "Great article with a lot of pictures. A good one!"
    Ed Price: "Great topic, Sara! Very thorough and well written!"
     Miscellaneous Technical Guru - September 2014  
    Brian Nadjiwon
    How to Create and Use Enums in Powershell
    Ed Price: "Wow, what a detailed article! Great depth and use of images! I think it's time for a PowerShell category!"
    TGN: "I LOVE ENUMS! Great explaining and a great article. Well done, Brian!"
    PG: "Nice, practical solution, clear explanation."
    Adnan Umer
    Understanding GPU Usage tool in Visual Studio 2013 Update 4
    Ed Price: " A fantastic Visual Studio article with great details and vivid images!"
    TGN: "Very valuable and a great toturiol on how to use the "GPU Usage tool"" 
    Britt Adams
    Unexplained High CPU Usage on Intel E5 Processors
    Ed Price: "Very thorough explanation! Great job! "
    TGN: "Wow, computer science is fun. Nice wrap-up and how-to. I loved it!" 
     SharePoint 2010 / 2013 Technical Guru - September 2014  
    Vivek Jagga
    SharePoint, Office 365 or a Hybrid Deployment?
    Jinchun Chen: "Excellent!"
    Margriet Bruggeman: "Nice, I can see this one coming in real handy in comparison studies"
    Inderjeet Singh
    Common issue when using SharePoint 2013 Multi Tenant environment
    (Apps and User Profile Synchronization)
    Jinchun Chen: "Nice article."
    Margriet Bruggeman: "Useful and not too much is written about this topics, which adds some bonus points"
    Dan Christian
    Tips and Tricks to Resolve Poject 2010 Server Migration Issues
    Margriet Bruggeman: "Extensive KB-type article in case you need it"
     Small Basic Technical Guru - September 2014  
    Philip Munts
    Small Basic: For Windows 8.1 Tablet
    Michiel Van Hoorn: "Great article for those (1) want to make apps for tablet form factors and (2) are looking to package a SB app into a package."
    Ed Price: "I love it! What an important topic!"
    Nonki Takahashi
    Small Basic: Emoji
    Michiel Van Hoorn: "Another entry from Nonki which opens up new possibilities. This time Emoji and the font editing."
    Ed Price: "This is incredibly interesting!"
    Nonki Takahashi
    Small Basic: Dictionary
    Michiel Van Hoorn: "Simple entry on a powerful feature"
    Ed Price: "Great overview of the Dictionary Object! Good job integrating the Known Issues and the See Also section!"
     SQL BI and Power BI Technical Guru - September 2014  
    visakh16
    Finding SSIS Packages having References to a Table or Column
    RB: "Interesting subject, with a lot of practical usage"
    Jinchun Chen: "Really helpful."
    PT: "Good article that addresses a specific problem and offers a solution. Thank you"
    Ch. Rajen Singh
    SSIS: Export Multiple File With Fixed Size
    PT: "This is a good article, well-written and solves a real problem."
    Jinchun Chen: "Nice article."
    RB: "Interesting workaround for the fixed file size problem"
    Ed Price - MSFT
    Power BI Community Council
    PT: "Great information about the purpose and composition of the Power BI Community Council to inform and raise awareness."
     SQL Server General and Database Engine Technical Guru - September 2014  
    Shanky
    An Examination of Logging in Truncate Table Statement
    and Its Comparison With Delete Statement
    Jinchun Chen: "Excellent" 
    AM: "The best!"
    Ed Price: "Wow, Shanky! What an amazingly thorough and detailed article!"
    Tulio Rosa
    SQL Server Load Balancing
    AM: "Also very good!"
    Jinchun Chen: "Excellent"    
    Ed Price: "Fantastic topic, good job on the diagram, and great use of TechNet Gallery! Plus a Portuguese translation!"
    Ashwin Menon
    Get Notified when a database status changes
    AM: "This is well explained"
    Ed Price: "Very thorough article! Good References section!"
     System Center Technical Guru - September 2014  
    Mr X
    How to upload new Drivers in SCCM 2012 R2 
    Peter Laker: "Very nice, thanks Mr X"
    Ed Price: "Wow. Great use of images to walk the reader through the process! Could benefit from a See Also and Additional Resources type of sections. Very thorough!"
    Mr X
    How to create a new Boot Image using SCCM 2012 R2 
    Peter Laker: "Another good article!"
    Ed Price: "Short and sweet How To article! It's great to cover all these scenarios. Excellent addition to our System Center library of content!"
     Transact-SQL Technical Guru - September 2014  
    visakh16
    Full Outer Join - The Most Generic Join Statement
    JS: "A good summary, though a bit generic and already available mutliple times on the internet. The sample (with data) could be a bit more crisp though."
    Jinchun Chen: "Very helpful."
    Ed Price: "I love the explanations at the top in the Context and Reasoning sections! And then the solution has a fantastic mix between explanations, illustrations, and the code snippets. And the links at the bottom help JOIN together
    the Join resources! Great job!"
    Praveen Rayan D'sa
    Dynamic pivot with column alias
    Jinchun Chen: "Good."
    JS: "Make sure no to use a parameter declaration without a size of the variable type, like in VARCHAR, better use Varchar(YourSizeHere)."
    Ed Price: "Fantastic solution. Good job getting the references in there at the bottom!"
    Saeid Hasani
    Calling Stored Procedures Using Transact-SQL
    JS: "A good write up for getting the feet wet with procedure, though missing some depth." 
    Ed Price: "Wow! I love your break out each section, explain it, and give the code snippet. It makes it very easy to read, understand, and get to the right section! To JS's point, it's probably better for beginners than advanced T-SQL
    gurus, but this content is still very valuable. Great example of the community giving advice and helping out with the content. Incredible article!"
     Visual C# Technical Guru - September 2014  
    João Sousa
    ASP.NET WebAPI - Basic Redis
    Peter Laker: "Nice WebAPI basics Joao!"
    JM: "This is best"
    Jaliya Udagedara
    Publishing and Subscribing using NServiceBus
    JM: "Close second IMO"
    Peter Laker: "Great intro to NServiceBus! Thanks Jaliya!"
    Adnan Umer
    Calculating Percentage Similarity of two Strings in C#
    JM: "I like this!"
    Peter Laker: "Awesome snippet and explanation, thanks Adnan!"
     Windows Phone and Windows Store Apps Technical Guru - September 2014  
    Adnan Umer
    Introducing ObjectGraphLibrary to visualize Stack and Heap
    JH: "Good article about stack and heap visualization."
    TGN: "Hardcore stuff, but very valuable. Great article buddy!"
    saramgsilva
    Microsoft’s Windows App Studio Beta: Creating a BackOffice App for Menu App
    JH: "Another great article by Sara! A lot of code snippets, pictures and explanations."
    TGN: "Great tutorial, well explained. And a bunch of screenshots. I loved it!"
    Muiz Khan
    Using Speech Recognition without Internet
    TGN: "Nice one. I love articles that explain something in an easy understanding way. Great work Muiz!"
    JH: "Good explanation of offline capabilities of speech recognition."
     Windows Presentation Foundation (WPF) Technical Guru - September 2014  
    Andy ONeill
    WPF: CollectionView Tips
    KJ: "wow cery thorough!"
    Peter Laker: "Blindingly good article Andy!"
    Magnus (MM8)
    WPF/MVVM: Binding the DatePickerTextBox in WPF
    KJ: "useful tip - could see needing to do this and searching for this article and finding it"
    Peter Laker: "Excellent work as always Magnus!"
     Wiki and Portals Technical Guru - September 2014  
    Durval Ramos
    Visio Portal
    Peter Laker: "Awe inspiring portal from a Wiki legend!"
    Ed Price: "Great introduction, a lot of links, divided by sections, and it even has References and Return to Top links! Amazing article!"
     Windows Server Technical Guru - September 2014  
    Mr X
    Getting Started with KMS (Key Management Service)
    JM: "Another excellent article, great work."
    Philippe Levesque: "Really good documentation."
    Richard Mueller: "Good topic with good images to explain."
    Mark Parris: "Good insights, would be good to higlight also the improvements in 2012 and 2012 R2."
    Kelly Bush
    Authentication Policies and Authentication Silos – Restricting Domain Controller
    Access
    Mark Parris: "Nice article, providing further insight into some of 2012 R2's capabilities."
    Richard Mueller: "Great article with lots of detail. Could use TOC and See Also section."
    JM: "An excellent article, thanks for the contribution!"
    Philippe Levesque: "Good article, it explain some security that we don't see much."
    FZB
    Windows Server: DNS Service - Negative Caching
    Mark Parris: "useful tidbit, i have often seen shortttl zones for such records."
    JM: "A good article, however it needs a rewrite for clarity."
    Philippe Levesque: "Andy information to have, thanks for sharing !"
    Richard Mueller: "Needs more explanation."
    Congratulations to everyone who won a medal and thank you to everyone who entered! Your success will be entered into folklore and sung about for generations to come!
    If you can do better, or simply wish to join our community and make a name for yourself, please enter this month's competition:
    http://social.technet.microsoft.com/wiki/contents/articles/26994.technet-guru-contributions-october-2014.aspx
    Regards,
    Pete
    #PEJL
    Got any nice code? If you invest time in coding an elegant, novel or impressive answer on MSDN forums, why not copy it over to the one and only
    TechNet Wiki, for future generations to benefit from! You'll never get archived again!
    If you are a member of any user groups, please make sure you list them in the
    Microsoft User Groups Portal. Microsoft are trying to help promote your groups, and collating them here is the first step.

    Hi Pete,
    Thank you for your information. Congratulations to Visakh16, Ch.Rajen Singh and Ed Price-MSFT.
    Regards,
    Charlie Liao
    TechNet Community Support

  • BDB- Recno multiple key/data pairs retrieval

    Hey,
    I am new to BDB and have just started to work with Berkley DB (ver. 5.3.15) using the Linux C API.
    I set up a simple Recno DB which is populated with sequential keys 1,2,3….100. DB Records are in variable length size, although, I am limiting them to a max size.
    Below are the environment and DB open flags I am using:
    dbenv->open(dbenv, DB_HOME_DIR, DB_SYSTEM_MEM | DB_INIT_LOCK | DB_CREATE | DB_INIT_MPOOL, 0)
    dbp->open(dbp, NULL, NULL,DATABASE_NAME, DB_RECNO, DB_CREATE, 0664))
    Single record get/put or using cursor to iterate over the all DB works well.
    However, I would like to retrieve multiple records in a single get call.
    These records can be non-sequential.
    For example, retrieving 3 records with the keys 4,89,90. I prefer the bulk buffer to be as minimal as possible (avoiding stack or heap unnecessary memory allocation).
    I was reading and saw few examples about using bulk retrieval. Though, I couldn’t find any example for racno bulk get on multiple specified keys.
    From what I figured out till now, it seems that I should use:
    Get flags: DB_SET_RECNO, DB_MULTIPLE_KEY. And the macros: DB_MULTIPLE_INIT and DB_MULTIPLE_RECNO_NEXT to iterate over a bulk buffer received.
    But, I couldn’t figure it out where and how I should specify the list of Keys.
    Beside, the BDB man says: "For DB_SET_RECNO to be specified, the underlying database must be of type Btree, and it must have been created with the DB_RECNUM flag."
    Does the BDB open with DB_RECNO flag imply that the underlying database is Btree? If creating Btree instead of recno, wouldn’t I loss access performances?
    I would appreciate if anyone could supply some guidelines or an example which will assist me to figure it out how to retrieve multiple key/data pairs from a recno DB.
    Thanks in advance
    Kimel

    I am checking the BDB to see if it can suit my needs (mostly performance wise).
    It should work on a simple home router device and should hold router runtime information (static/dynamic).
    This information should be accessible for process in the system which can write or read the device info.
    The DB is not require to be persistent and is recreated every reboot (memory only).
    I believe the DB will hold not more then 200 parameters at max.
    DB access rate is around 30 records per sec (write/read)...
    Currently, I think of either BDB or maybe just use a normal Linux shared memory (random access + semaphore).
    Cons and pros to each...
    If I choose BDB, I will use the in memory DB and recno due to access performance considerations.
    Getting back to my question, I would like to be able to read a list of parameters in a single get call.
    In order to use recno, I will give every parameter a unique id (1 - ip, 2 - subnet , 3 - default gateway).
    e.g: ip , subnet , default gateway. (get keys 1,2,3)
    Hope you have the relevant info.
    Thanks

  • Can i use create function for MSSql scalar and table valude function.

    Hi,
    1) Can i use create function for MSSql scalar and table valued function?
    2) How many type of user defined function are there in oracle 11g express?
    3) And can i reture any "type" form user defined function?
    yourse sincerely

    944768 wrote:
    Q1)That means even if i return predefined types like integer, varchar2 then also PGA is used ?The data type does not determine where the variable is stored. A string (called a varchar2 in Oracle) can be stored in stack space, heap space, on disk, in a memory mapped file, in a shared memory, in an atom table, etc.
    It is the who and what is defining and using that string, that determines where and how it is stored.
    The Oracle sever supports 2 languages in PL/SQL. The PL (Programming Logic) language is a procedural/declarative language. It is NOT SQL. SQL is integrated with it. The PL/SQL engine uses private process memory (PGA). So PL/SQL variables exist in the PGA (but there are exceptions such as LOBs).
    Q2) So please suggest me solution in oracle.Sounds to me you are looking at how to implement a T-SQL style function as an Oracle function, and once implemented, do joins on the function.
    Do not use PL/SQL in SQL in place of a SQL select. It is not T-SQL.
    One cannot use PL/SQL to create functions along the style of T-SQL, where the function executes a SQL using some conditional logic, and then return as if the function was a native SQL select.
    T-SQL is an extension to the SQL language - making it a hybrid and very impure language implementation. PL is based on ADA - part of the Pascal family of languages. The E-SQL (embedded SQL) approach used in languages like C/C++, Cobol and Ada, has been transparently done in PL/SQL. You can write and mix PL code and variables with SQL code. And the PL/SQL engine figures out how to make the call from the PL/SQL engine to the SQL engine.
    But PL/SQL is not "part" of the SQL language and does not "extend" the SQL language in a T-SQL fashion.
    So you need to check your SQL-Server preconcepts in at the door, as they are not only irrelevant in Oracle, they are WRONG in Oracle.
    The correct way in Oracle, in a nutshell - Use the SQL language to do data processing. Use PL/SQL to manage conditional process flow and the handling of errors.

  • How do I print text document (spreadsheet) in 11 x 17 format with landscape orientation?

    Print preview shows only in portrait orientation when I get an image at all, then when I hit "print" icon, get instant message that says "out of memory".  Also cannot seem to get printer to recognize 11 x 17 size -- keeps saying that printer settings & paper size do not match.

    Don't want to come across as ungrateful, but I'm NOT impressed with how these postings are being handled.  Guess I should expect that with HP -- ever since their calculators came out with RPN, the culture of HP has been different from most others.
    To repeat myself, my printer is HP B8550 Photosmart, capable of wide format printing -- the reason I purchased this one after reading reviews by others  of all its features.  My OS is Windows XP Home Edition.  My problem is with trying to print out a spreadsheet format of a large genealogical database that I have created, using Windows Works.  When I open the file, create the desired printer settings, and perform the page set-up tasks, all I get when I hit "print preview" is an error message that says "out of memory", which prevents any further action.  When I clear that from the screen & try to see a print preview, I get a truncated image of the spreadsheet in PORTRAIT orientation & not the LANDSCAPE orientation that I have set the document printing for.
    While awaiting a useful response from yesterday's forum (& not getting one), I tried a different Word document while using the same 11 x 17 sheet size setting for the printer, & that document was processed without a hiccup.  I'm now more inclined to believe that there is something wrong with my Window Works software & NOT the printer software that just doesn't want to deal with 11 x 17 spreadsheets in queue or out on the stack (or heap -- wherever the machine stages such data for processing), but I just don't know.  Made a separate file using just one page of the database, thinking that maybe the 4.5 MB file size was the problem, but that had absolutely no effect on the situation -- it won't print even that small file as structured.  To display all the data, I need to use landscape orientation.  Puzzled why it won't show in that orientation even within print preview.
    ANY advice on how to get this project to work properly is appreciated -- it represents about 8 years' worth of work in creating it & I'm ready to make a hard copy to use while doing on-site work at various archives holding such records.

Maybe you are looking for

  • IE running under XP can't handle multiple SWF files, Why?

    I noticed that IE 8 running under Windows XP cannot handle multiple swf files in one page. Up to about 10 files is no problem they are loaded and we can play them ( buttons that start a small audio file). But more of these files in one page will stop

  • Best Practice Installation

    Hi, We are preparing a sandbox for demo purpose , we would like to have current production configuration copy in one client and install Best Practice on another client.Is it possible?! If i install Best Practice on other client(say on 300) after copy

  • VERY disappointed new user - any and all help would be appeciated

    OK, I know there are million post on this topic "ITunes Could not connect to the iTunes Store. The network connection was refused. Make sure your settings are correct and your network connection is active. then try again." I've read for the past 4 da

  • Having a problem with PSE7.0

    I've had it for quite awhile and this is the first problem I've had with it...just recently, about 30 minutes ago to be precise lol, it started acting funny. The effects won't load and it shuts down. I've reset the preferences twice, restarted my PC

  • Crash on startup with 7.7.1 (11), related to iTunes Store

    I just upgraded, and iTunes crashes on start-up unless I turn Airport off first. If Airport is off when I start iTunes, I can turn the Airport on after I launch iTunes, but if I try to access the iTunes store, iTunes crashes.