MappedByteBuffer - How does it handle the physical memory?

Hello!
I have some question regarding the java.nio.MappedByteBuffer class. I am wondering how does it exactly handle the physical memory.
As first, I guess when I map a file into the the memory it does not mean that the whole file is being read into the physical memory. Am I right?
My second question is, if I map more files into the memory, is there a real danger that I will get an out-of-memory exception? Is available any official resource about the memory management of this class?
And my third question is, what is more efficient way at all, to use the MappedByteBuffer class or to use a FileChannel?
I am looking forward to your replies!

Tomi1226 wrote:
I have some question regarding the java.nio.MappedByteBuffer class. I am wondering how does it exactly handle the physical memory.Java maps the file into virtual memory, the OS determines how to translate virtual memory into physical memory. Java has no control over how the OS does this, nor should it need to.
As first, I guess when I map a file into the the memory it does not mean that the whole file is being read into the physical memory. Am I right?True, map != read or what would be the point.
My second question is, if I map more files into the memory, is there a real danger that I will get an out-of-memory exception? An out of memory ERROR occurs when you run out of heap space. If you create enough file maps you are likely to run out of file handles or some other resourfe before you run out of heap.
Exception != Error.
Is available any official resource about the memory management of this class?Which class?
And my third question is, what is more efficient way at all, to use the MappedByteBuffer class or to use a FileChannel?It depends on what you are doing.

Similar Messages

  • How can one use the physical memory of our system rather than virtual memory while running Labview?

    We have a Windows NT system with 2 Gb of physical memory and would like to utilize the RAM fully using Labview. What usually occurs is that Labview uses a tremendous amount of page file space while a majority of the physical memory is unused. Is there a way to configure Labview (or our system) to overcome this problem? It seems that our processes would be much faster if they were mainly using the physical memory. Is it possible to trick the system, by creating a RAM disk and allocating this as virtual memory space?

    > We have a Windows NT system with 2 Gb of physical memory and would
    > like to utilize the RAM fully using Labview. What usually occurs is
    > that Labview uses a tremendous amount of page file space while a
    > majority of the physical memory is unused. Is there a way to
    > configure Labview (or our system) to overcome this problem? It seems
    > that our processes would be much faster if they were mainly using the
    > physical memory. Is it possible to trick the system, by creating a
    > RAM disk and allocating this as virtual memory space?
    LabVIEW the application doesn't know anything about physical versus
    virtual memory. LV asks the OS for general purpose memory and goes
    from there.
    Drivers like DAQ and IMAQ will have a combination of general user
    memory and page lo
    cked physical buffers.
    I'm not up on the details, but this is something that the OS is in
    control of, so that is where you need to look for the solution. One
    of the things to look at is the disk cache. By default, I think that
    NT takes a percentage of the RAM to use for disk cache. With that
    much RAM, this is probably unnecessary and is using too much.
    Similarly, the OS may be attempting to keep the working set size
    to a fraction of the total RAM to reserve space for other things.
    It doesn't make sense to me, but then I don't work for MS.
    Greg McKaskle

  • How Does BI Build The Physical SQL

    How does BI build physical queries? Below I have two queries.
    Query1 – This is what BI builds. I tried to run it but after 14 minutes of no results, I kill the job.
    Query2 – This is just the extraction of the base query from Query1. This runs in 2:08 minutes.
    For whatever reason, BI is taking the base query and making it an inline view to create Query1. The wrapper query around this view is slow. Very weird.
    There are only 409 rows returned.
    Why does BI build these physical queries with the code WITH SAWITH0 ... ? It seems to be very inefficient.
    Is there a way to force BI to not use this inefficient method?
    Query1
    WITH SAWITH0 AS
    (select max(T321619.PRJ_EST_SALES) as c1,
    max(T321619.PRJ_EST_TONS) as c2,
    max(T321619.PRJ_EST_MARGIN_PCT) as c3,
    T316339.NAME as c4,
    T321619.REGION as c5,
    substr(T324598.X_TERRITORY,
    instr(T324598.X_TERRITORY, '.', 1, 4) + 1,
    instr(T324598.X_TERRITORY, '.', 1, 5) -
    instr(T324598.X_TERRITORY, '.', 1, 4) - 1) as c6,
    T342203.PER_NAME_MONTH as c7,
    T321619.PROJ_DESC as c8,
    T316552.FULL_NAME as c9,
    min(T342064.PER_NAME_MONTH) as c10,
    T321619.BUILD_PART_ORD_IND as c11,
    T321619.STATUS as c12
    from obia.W_DAY_D T342064 /* Dim_W_DAY_D_SOCPM_Order_Create_Date */,
    obia.W_DAY_D T342203 /* Dim_W_DAY_D_SOCPM_Proj_Creat_Date */,
    obia.WC_VW_PROJECT_INFO_F T342484 /* Dim_WC_VW_PROJECT_INFO_F_SOCPM */,
    obia.W_EMPLOYEE_D T316552 /* Dim_W_EMPLOYEE_D_Sales_Sales_Order_Resp_Custom */,
    obia.W_CUSTOMER_LOC_USE_D T324598 /* Dim_W_CUSTOMER_LOC_USE_D_Sales_Customer_Bill_To_Loc_Use_Custom */,
    obia.W_PARTY_D T316339 /* Dim_W_PARTY_D_Sales_Sales_Order_Customer_Custom */,
    obia.WC_ORDER_VWO T321619 /* Fact_WC_ORDER_VW_SalesOrderCustom */
    where (T316339.ROW_WID = T321619.CUSTOMER_WID and
    T316552.ROW_WID = T321619.X_SALESREP_WID and
    T321619.BILL_TO_SITE_USE_WID = T324598.ROW_WID and
    T321619.ORDER_DATE_WID = T342064.ROW_WID and
    T321619.DIVISION_INCL_BSC = 'VP' and
    T321619.PROJ_DESC = T342484.PROJ_DESC and
    T342203.ROW_WID = T342484.MIN_ORDER_CREATION_DATE_WID and
    T342203.PER_NAME_MONTH = '2013 / 04')
    group by T316339.NAME,
    T316552.FULL_NAME,
    T321619.REGION,
    T321619.PROJ_DESC,
    T321619.STATUS,
    T321619.BUILD_PART_ORD_IND,
    T342203.PER_NAME_MONTH,
    substr(T324598.X_TERRITORY,
    instr(T324598.X_TERRITORY, '.', 1, 4) + 1,
    instr(T324598.X_TERRITORY, '.', 1, 5) -
    instr(T324598.X_TERRITORY, '.', 1, 4) - 1)),
    SAWITH1 AS
    (select max(D1.c1) over(partition by D1.c8, D1.c4, D1.c9, D1.c6, D1.c7) as c1,
    max(D1.c2) over(partition by D1.c8, D1.c4, D1.c9, D1.c6, D1.c7) as c2,
    max(D1.c3) over(partition by D1.c8, D1.c4, D1.c9, D1.c6, D1.c7) as c3,
    D1.c4 as c4,
    D1.c5 as c5,
    D1.c6 as c6,
    D1.c7 as c7,
    D1.c8 as c8,
    D1.c9 as c9,
    D1.c10 as c10,
    D1.c11 as c11,
    D1.c12 as c12
    from SAWITH0 D1)
    select distinct 0 as c1,
    D1.c4 as c2,
    D1.c5 as c3,
    D1.c6 as c4,
    D1.c11 as c5,
    D1.c7 as c6,
    D1.c8 as c7,
    D1.c9 as c8,
    D1.c12 as c9,
    D1.c3 as c10,
    D1.c1 as c11,
    D1.c2 as c12
    from SAWITH1 D1
    where (D1.c7 = D1.c10 and (D1.c1 >= 500 or D1.c1 <= -500))
    order by c2, c3, c4, c5, c6, c7, c8, c9
    Query2
    select max(T321619.PRJ_EST_SALES) as c1,
    max(T321619.PRJ_EST_TONS) as c2,
    max(T321619.PRJ_EST_MARGIN_PCT) as c3,
    T316339.NAME as c4,
    T321619.REGION as c5,
    substr(T324598.X_TERRITORY,
    instr(T324598.X_TERRITORY, '.', 1, 4) + 1,
    instr(T324598.X_TERRITORY, '.', 1, 5) -
    instr(T324598.X_TERRITORY, '.', 1, 4) - 1) as c6,
    T342203.PER_NAME_MONTH as c7,
    T321619.PROJ_DESC as c8,
    T316552.FULL_NAME as c9,
    min(T342064.PER_NAME_MONTH) as c10,
    T321619.BUILD_PART_ORD_IND as c11,
    T321619.STATUS as c12
    from obia.W_DAY_D T342064 /* Dim_W_DAY_D_SOCPM_Order_Create_Date */,
    obia.W_DAY_D T342203 /* Dim_W_DAY_D_SOCPM_Proj_Creat_Date */,
    obia.WC_VW_PROJECT_INFO_F T342484 /* Dim_WC_VW_PROJECT_INFO_F_SOCPM */,
    obia.W_EMPLOYEE_D T316552 /* Dim_W_EMPLOYEE_D_Sales_Sales_Order_Resp_Custom */,
    obia.W_CUSTOMER_LOC_USE_D T324598 /* Dim_W_CUSTOMER_LOC_USE_D_Sales_Customer_Bill_To_Loc_Use_Custom */,
    obia.W_PARTY_D T316339 /* Dim_W_PARTY_D_Sales_Sales_Order_Customer_Custom */,
    obia.WC_ORDER_VWO T321619 /* Fact_WC_ORDER_VW_SalesOrderCustom */
    where (T316339.ROW_WID = T321619.CUSTOMER_WID and
    T316552.ROW_WID = T321619.X_SALESREP_WID and
    T321619.BILL_TO_SITE_USE_WID = T324598.ROW_WID and
    T321619.ORDER_DATE_WID = T342064.ROW_WID and
    T321619.DIVISION_INCL_BSC = 'VP' and
    T321619.PROJ_DESC = T342484.PROJ_DESC and
    T342203.ROW_WID = T342484.MIN_ORDER_CREATION_DATE_WID and
    T342203.PER_NAME_MONTH = '2013 / 04')
    group by T316339.NAME,
    T316552.FULL_NAME,
    T321619.REGION,
    T321619.PROJ_DESC,
    T321619.STATUS,
    T321619.BUILD_PART_ORD_IND,
    T342203.PER_NAME_MONTH,
    substr(T324598.X_TERRITORY,
    instr(T324598.X_TERRITORY, '.', 1, 4) + 1,
    instr(T324598.X_TERRITORY, '.', 1, 5) -
    instr(T324598.X_TERRITORY, '.', 1, 4) - 1)
    ;

    When you have aggregation rules applied on the front end, OBIEE forms the additional query where you are concerned about.
    Try to push the logic as much as possible to RPD side and also try to use FILTER function instead of CASE WHEN.

  • How does Compressor handle the upscaling??? Architecture animation render.

    good5day!
    it seems that the due date is becoming my do date for a 3d architectural animation. therefore i'm looking for alternatives.
    for the first time* i need to deliver an animation as dvd movie (previously- mov, mpeg, avi, xvid blabla)
    when i want perfect quality, i render an animation in 1280x720px (16:9), format-uncompressed .mov or targa image sequence. steping up this resolution is insane, render time would be years for my machine...:)
    well, but this time..no time
    therefore:
    if i did the render in 853x480 (also uncompressed mov or tga), how would apple final cut compressor perform when upscaling to 1280x720px (720p)? is the upscale factor too big for getting good quality? or compressor can handle it?
    the presentation will be shown on apple 24" displays (where probably even SD DVD would look good if watched from reasonable distance) and as i am informed- a monster tv, dunno what they meant, but it's scary:)
    so- anybody has experience/knoledge about upscaling vs quality in compressor?
    thanks in advance,
    reinis

    If you are planning to play these back from QT player, there might be some advantage in having Compressor scale these up to HD resolution. Compressor should be able to do a good job with the upscaling, but it will take a long time, particularly if you turn on the frame controls.
    The only other option for full-screen playback that I know of would be DVD Player, for which you would have to play back a VIDEO_TS folder from the hard drive. I don't think it will play back an HDDVD build, in which case you might as well encode an SD mpeg. You are still converting the frame size in this case, and compressor will take a long time.
    To get the output to the Monster TV (eek!) you might find the most expedient method would be to create an SD DVD and play it back with an upscaling DVD player. I find that upscaling in hardware in this way can often give better HD quality than trying to convert in software.

  • How does Oracle handles the delete ?

    Hi ,
    I have a unix loder that does the issue this command
    EXEC SQL DELETE FROM TBl1 where id in (select id from TMP)
    if any user is accessing a record in TBL1 , will Oracle wait for the record to be released before it does the delete or it simply skip it ?
    pls advise
    tks & rgds

    It will wait please look at the example below:
    Session 1:
    [email protected]> select * from dept;
    DEPTNO DNAME LOC
    10 ACCOUNTING NEW YORK
    20 RESEARCH DALLAS
    30 SALES CHICAGO
    40 OPERATIONS BOSTON
    [email protected]> update dept set loc = 'WARSAW' where deptno = 10;
    1 row updated.
    Session 2:
    [email protected]> delete dept;
    -- waiting
    Session 1:
    [email protected]> commit;
    Commit complete.
    Session 2:
    4 rows deleted.
    [email protected]> select * from dept;
    DEPTNO DNAME LOC
    10 ACCOUNTING WARSAW
    20 RESEARCH DALLAS
    30 SALES CHICAGO
    40 OPERATIONS BOSTON
    Location was changed
    Best Regards
    Krystian Zieja / mob

  • How to create blocks on Procedures? How does one handle I/U/D on the block?

    Hello Gurus,
    How to create blocks on Procedures? How does one handle I/U/D on the block?
    Please give an example.
    Thank You,

    Hello Gurus,
    How to create blocks on Procedures? How does one handle I/U/D on the block?
    Please give an example.
    Thank You,

  • Any idea how the java application can get the physical memory?

    Hello, everyone
    Any idea how the java application can get the physical memory?
    thanks in advance

    I believe what yo intend to do is forbidden, but here
    my answer.
    when you start your application you can give your VM
    the entire memory of your pc. like this this memory
    is completly under your control.* headdesk *

  • How does Safari handle fonts? Because the fonts looks different

    Hi,
    I "developped" (please don't laugh) a webpage in Firefox.
    http://test.patrickeischen.com
    Safari however changes the font, font-size and line-height which is not what I want. Does Safari handle the fonts different that other browsers?
    Patrick

    I think the problem is with an error in this line in the CSS:
    font: small/1.75em , Tahoma, "Trebuchet MS", Verdana, sans-serif;
    There should not be a comma after "small/1.75em". That line should read:
    font: small/1.75em Tahoma, "Trebuchet MS", Verdana, sans-serif;
    Other web browsers are probably being forgiving about that error and interpreting that line of CSS as it is intended, while Safari is balking at that error and ignoring everything after the comma that doesn't belong.
    I noticed that error when I was skimming through the CSS looking for your font declarations. But you can also find it by running the W3C CSS validator, a very handy tool when working on web sites, along with the W3C HTML validator. While these won't in themselves help you understand everything there is to know about web coding errors and browser display differences, using them to minimize or eliminate your coding errors often helps narrow down other problems as well.
    Message was edited by: Rachel R

  • How does this happen: The picture of recent apps you get when double clicking the home button showed in Settings-Wifi that I had been connected to a network I have not been near for two months. Its not a recent "image" of Settings-Wifi. Can anyone explain

    How does this happen: The picture of recent apps you get when double clicking the home button showed in Settings-Wifi that I had been connected to a network I have not been near for two months. Its not a recent "image" of Settings-Wifi. Can anyone explain?

    Greetings,
    I've never seen this issue, and I handle many iPads, of all versions. WiFi issues are generally local to the WiFi router - they are not all of the same quality, range, immunity to interference, etc. You have distance, building construction, and the biggie - interference.
    At home, I use Apple routers, and have no issues with any of my WiFi enabled devices, computers, mobile devices, etc - even the lowly PeeCees. I have locations where I have Juniper Networks, as well as Aruba, and a few Netgears - all of them work as they should.
    The cheaper routers, Linksys, D-Link, Seimens home units, and many other no name devices have caused issues of various kinds, and even connectivity.
    I have no idea what Starbucks uses, but I always have a good connection, and I go there nearly every morning and get some work done, as well as play.
    You could try changing channels, 2.4 to 5 Gigs, changing locations of the router. I have had to do all of these at one time or another over the many years that I have been a Network Engineer.
    Good Luck - Cheers,
    M.

  • [solved] How does Pacman handle config files?

    Hi,
    I've read that Pacman handles config files by comparing their hashes in 3 different statuses.
    (which are in current status, new status, and original status)
    The current config file's hash is easily obtained, and so does the new ones'.
    But how does Pacman get the original one's hash?
    Can someone tell me, please?
    Thank you, and happy new year,
    bsdson
    Last edited by bsdson.tw (2008-12-26 07:37:41)

    It is stored in the pacman database.  e.g. look at /var/lib/pacman/local/pacman-3.2.1-2/files

  • How does impdp handles external tables

    I am just done with schema import and one of the package is invalid because it is referring the External Table. I am getting the error " Table or View does not exist".
    How does impdp handles external tables ?
    Do we need to replicate the directories and files from the source to imported destination ?
    Thanks

    Hi,
    Yes...
    external table directory not available on imported destination operating system
    You need to create the directories and files from the source to imported destination
    Recompile the invalid package
    Thanks

  • How do I combine my iphone contact list with my laptop pc contact list?  And how does it handle duplicates with different information?

    How do I combine my iphone contact list with my laptop pc contact list? And how does it handle duplicates that have different information?
    How do I merge my iphone calendar appointments/alerts with my laptop pc calendar appointments/alerts?  And how does it handle duplicates?
    I do not need anything to change on my email that is working fine on both.

        gspielman,
    Help has arrived to assist you with getting those contacts on both your devices. The Verizon cloud service is definitely a great tool to use and you can also use Apple iCloud as well. When you sign into the Verizon cloud on your iPad does it give an option or message to restore?
    CandiceH_VZW
    Follow us on Twitter @VZWSupport

  • How does FCP handle 23.98 DV Files?

    Hi All,
    Has anyone Edited using the DV-NTSC 24P (23.98fps) Easy Setup?
    1) How does FCP handle this video connected to a DV Converter Box like the Canopus ADVC-110?
    2) Does it actually play at 23.98fps on a monitor connected to the DV Converter Box?
    3) Does it get converted to 29.97fps somewhere in the process before it gets displayed?
    4) is it displayed at 29.97fps or is it really being displayed at 23.98fps?
    these are things that I am not sure of.
    sorry if I posted this message a couple of times. I didn't know that hitting the "Tab" Button posts the message, I thought it would just function like the Tab in a normal Text editor and indent a line. But here it doesn't.
    thanks
    Kalagan

    Hi,
    Thanks for the feed back. I guess I should fill in the caps a little.
    *DESCRIPTION OF ISSUE:*
    One of our main Clients Disney, is migrating to a Tapeless Workflow based on ProRes HQ 422 @ 23.98fps. From here on out, they will only send us ProRes HQ 422 1920x1080 files @ 23.98fps and they want us to Edit every project we work on for them @ 23.98fps. At the moment, it doesn't sound like they care if we Edit our projects in ProRes HD or some SD format, but the important thing to them is that we edit @ 23.98fps.
    PROBLEM:
    Our facility doesn't have the infrastructure to support 25 machines accessing ProRes HQ 422 files. Our facility was built to support DV NTSC @ 29.97fps and we have been working this way fairly well, for a number of years.
    SOLUTION:
    I am trying to find a way to continue to us our current equipment and satisfy Disney's request to work on all their projects at 23.98fps, starting from 1920x1080 ProRes HQ 422 files @ 23.98fps. So, it was my hope to be able to take the 23.98fps ProRes files and export them to 23.98fps DV NTSC. This way we wouldn't have to reconfigure our entire Facility (which would cost a couple hundred Thousand dollars).
    My approach was to:
    1) Use Media Manager to render a new DV NTSC file at 23.98fps, which it does pretty well for the most part. It keeps the Timecode consistent between the two files (very important), but doesn't allow you to Letterbox the 16x9 video in the 4x3 frame, it just stretches it to fill the entire 4x3 frame (not so good).
    2) Then import the newly created DV NTSC 23.98fps file into a FCP Project based on the DV NTSC 24(p) 23.98fps EASY SETUP. Which works well. No problems there.
    3) Then Play the file in FCP out through a Firewire based Canopus ADVC-110 DV Converter connected to a SD Sony Monitor. This seemed to worked fine also.
    The fact that it plays is great!!!! But, that brings up the question, is it really playing a 23.98fps?
    My understanding of Standard Definition and specifically DV NTSC, is that it can only be displayed at 29.97fps, it doesn't support 23.98fps natively. So the fact that it played when I tested it got me thinking that I may be missing something here and DV NTSC and other SD equipment (like the Sony SD Monitor) can playback/support 23.98fps SD video. But that goes against everything I know up to this point!!!
    Have I been wrong all this time?
    1) Can SD Video and DV NTSC Video be displayed at 23.98fps?
    2) Or is it getting converted to 29.97fps somewhere in the process before it is getting displayed?
    3) If it is getting converted back to 29.97fps, then where is it getting converted, FCP or in the DV Converter Box?
    I am sorry I went a little long on this email, but it is a problem that will have great influence on they way we work for a couple of years to come!!
    Thanks for your input!!
    Kalagan

  • How does one change the font size for folders and/or file lists in the Bookmarks Library?

    How does one change the font size for folders and/or file lists in the '''Bookmarks''' Library?
    Since the upgrade to version 9.0.1 of Firefox, the Bookmarks feature changes are confusing me. They seem to be confusing themselves as well. The list of bookmarks has changed. The font size is so small that my aging eyes cannot read it without fogging the screen with my breath. Some folders are out of alphabetical order (where I know they were previously good), and some are missing altogether (folders to which I frequently add references).
    As for missing or deranged files or folders, was there something that I should have done or now need to do to recover those after the upgrade (or before)?
    With regard to font size,
    1. there is no “Edit Bookmarks” or like option to edit the list in this version
    2. the “zoom” option in the “view” list of functions is greyed out when in “Show All Bookmarks” window
    3. expanding the browser window has no effect on font size
    4. “Preferences” settings for font size has no effect in that window either, including advanced settings
    5. “Help” offers none that I can find.
    Can any of you Help?!?

    Maybe this extension helps:
    *Theme Font & Size Changer: https://addons.mozilla.org/firefox/addon/theme-font-size-changer/

  • In InDesign, how does one determine the pixel size of a text box? Specifically, we need to write text to specifications of 600 pixel width, and have no idea a) how to scale a text box to specific pixel width, b) how to

    This may be a basic question... but in InDesign, how does one determine the pixel size of a text box? Specifically, we need to write text to specifications of 600 pixel width, and have no idea a) how to scale a text box to specific pixel width, b) how to determine what word count we can fit in, and c) how to do it in a table? Thanks!

    Set your ruler increments to pixels Preferences>Units & Increments. You can fill the text box with placeholder text Type>Fill with Placeholder text and get a word count from the Info panel with Show Options turned on from the flyout.
    From the Transform panel you can set a text box's width and height

Maybe you are looking for

  • 2 iPods on Same Computer

    My wife has an iPod Touch. I want to purchase one and install on the same computer. Can this be done with separate songs and apps?

  • XPath expressions in XmlCursor / XmlObjects

    Hi all, I tried to get a portion of an XML by using XPath Expressions as follows: String xPathExpression = "declare namespace xq='http://inti.notariado.org/indices' " + "$this/xq:RULES/xq:RULE[@disabled]"; A simple example of an xml <rules> <rule dis

  • Send email through SO_NEW_DOCUMENT_ATT_SEND_API1 with PDF attachement of smartforms.

    Hi, I am converting a smartform to PDF and then sending it as an attachment to email using FM SO_NEW_DOCUMENT_ATT_SEND_API1. But I am getting this error. 'Error calling FM <SBCOMS_SEND_REQUEST_CREATE> in <SO_DOCUMENT_SEND_API1> with SY-SUBRC <1>' I a

  • How to specify a custom User-Agent for an HTTPService call?

    I'm trying to have HTTPService send a custom User-Agent string in the request headers but it seems to ignore the header="" method. Is there any documentation on how to do this? Or would I have to use URLRequest instead?

  • How to setup clients to use authentication to access OID

    Hello, I'd like to perform two tasks with OID: 1) anonymous OID browse for net service entries access to everyone (simple all client configuration - add LDAP naming method and ldap.ora) 2) password protected OID browse for particular net service entr