What exactly are side-effects in #pragma no_side_effect?

Which of the following qualify as side-effects for the purposes of #pragma [no_side_effect|http://docs.sun.com/app/docs/doc/819-5265/bjaby?a=view#bjacp]:
1. dynamically allocating/deallocating memory using malloc/free or operator new/delete
2. exiting the function by throwing a C++ exception
3. temporarily changing the disposition for a signal (e.g., ignoring or suspending a signal)
4. creating a thread and joining with it

Thanks for your answers! Just to make sure I understand correctly: accessing the local state of the caller through a parameter is not a side-effect. I.e., in the following snippet the function has_no_side_effects() has no side-effects:
int get (int *p) { return *p; }
void set (int *p, int x) { *p = x; }
void has_no_side_effects () {
    int x;
    int y;
    set (&x, 0);    // not a side-effect (x is local)
    y = get (&x);   // same
}But in the following, has_side_effects() does:
void has_side_effects () {
    static int x;
    static int y;
    set (&x, 0);    // side-effect: writing a "global"
    y = get (&x);   // side-effect: reading a "global"
}Also, reading global const data (i.e., what might be in ROM) is not a side-effect. Correct? E.g.,
static const int global[] = { 1, 2 };
void has_no_side_effects () {
    int x;
    int y;
    x = global [0];   // not a side-effect, global is in ROM
    y = global [1];   // same
}

Similar Messages

  • What exactly are Field symbols?

    Hi SDN,
    What exactly are Field symbols?
    I have read they are not pointers then what are they?
    Regards,
    Rahul

    Hi
    see this
    Field Symbols
    Field symbols are placeholders or symbolic names for other fields. They do not physically reserve space for a field, but point to its contents. A field symbol cam point to any data object. The data object to which a field symbol points is assigned to it after it has been declared in the program.
    Whenever you address a field symbol in a program, you are addressing the field that is assigned to the field symbol. After successful assignment, there is no difference in ABAP whether you reference the field symbol or the field itself. You must assign a field to each field symbol before you can address the latter in programs.
    Field symbols are similar to dereferenced pointers in C (that is, pointers to which the content operator * is applied). However, the only real equivalent of pointers in ABAP, that is, variables that contain a memory address (reference) and that can be used without the contents operator, are reference variables in ABAP Objects.
    All operations programmed with field symbols are applied to the field assigned to it. For example, a MOVE statement between two field symbols moves the contents of the field assigned to the first field symbol to the field assigned to the second field symbol. The field symbols themselves point to the same fields after the MOVE statement as they did before.
    You can create field symbols either without or with type specifications. If you do not specify a type, the field symbol inherits all of the technical attributes of the field assigned to it. If you do specify a type, the system checks the compatibility of the field symbol and the field you are assigning to it during the ASSIGN statement.
    Field symbols provide greater flexibility when you address data objects:
    If you want to process sections of fields, you can specify the offset and length of the field dynamically.
    You can assign one field symbol to another, which allows you to address parts of fields.
    Assignments to field symbols may extend beyond field boundaries. This allows you to address regular sequences of fields in memory efficiently.
    You can also force a field symbol to take different technical attributes from those of the field assigned to it.
    The flexibility of field symbols provides elegant solutions to certain problems. On the other hand, it does mean that errors can easily occur. Since fields are not assigned to field symbols until runtime, the effectiveness of syntax and security checks is very limited for operations involving field symbols. This can lead to runtime errors or incorrect data assignments.
    While runtime errors indicate an obvious problem, incorrect data assignments are dangerous because they can be very difficult to detect. For this reason, you should only use field symbols if you cannot achieve the same result using other ABAP statements.
    For example, you may want to process part of a string where the offset and length depend on the contents of the field. You could use field symbols in this case. However, since the MOVE statement also supports variable offset and length specifications, you should use it instead. The MOVE statement (with your own auxiliary variables if required) is much safer than using field symbols, since it cannot address memory beyond the boundary of a field. However, field symbols may improve performance in some cases.
    check the below links u will get the answers for your questions
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3860358411d1829f0000e829fbfe/content.htm
    http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/field_sy.htm
    http://searchsap.techtarget.com/tip/1,289483,sid21_gci920484,00.html
    Syntax Diagram
    FIELD-SYMBOLS
    Basic form
    FIELD-SYMBOLS <fs>.
    Extras:
    1. ... TYPE type
    2. ... TYPE REF TO cif
    3. ... TYPE REF TO DATA
    4. ... TYPE LINE OF type
    5. ... LIKE s
    6. ... LIKE LINE OF s
    7. ... TYPE tabkind
    8. ... STRUCTURE s DEFAULT wa
    The syntax check performed in an ABAP Objects context is stricter than in other ABAP areas. See Cannot Use Untyped Field Symbols ad Cannot Use Field Symbols as Components of Classes.
    Effect
    This statement declares a symbolic field called <fs>. At runtime, you can assign a concrete field to the field symbol using ASSIGN. All operations performed with the field symbol then directly affect the field assigned to it.
    You can only use one of the additions.
    Example
    Output aircraft type from the table SFLIGHT using a field symbol:
    FIELD-SYMBOLS <PT> TYPE ANY.
    DATA SFLIGHT_WA TYPE SFLIGHT.
    ASSIGN SFLIGHT_WA-PLANETYPE TO <PT>.
    WRITE <PT>.
    Addition 1
    ... TYPE type
    Addition 2
    ... TYPE REF TO cif
    Addition 3
    ... TYPE REF TO DATA
    Addition 4
    ... TYPE LINE OF type
    Addition 5
    ... LIKE s
    Addition 6
    ... LIKE LINE OF s
    Addition 7
    ... TYPE tabkind
    Effect
    You can define the type of the field symbol using additions 2 to 7 (just as you can for FORM parameters (compare Defining the Type of Subroutine Parameters). When you use the ASSIGN statement, the system carries out the same type checks as for USING parameters of FORMs.
    This addition is not allowed in an ABAP Objects context. See Cannot Use Obsolete Casting for FIELD SYMBOLS.
    In some cases, the syntax rules that apply to Unicode programs are different than those for non-Unicode programs. See Defining Types Using STRUCTURE.
    Effect
    Assigns any (internal) field string or structure to the field symbol from the ABAP Dictionary (s). All fields of the structure can be addressed by name: <fs>-fieldname. The structured field symbol points initially to the work area wa specified after DEFAULT.
    The work area wa must be at least as long as the structure s. If s contains fields of the type I or F, wa should have the structure s or at least begin in that way, since otherwise alignment problems may occur.
    Example
    Address components of the flight bookings table SBOOK using a field symbol:
    DATA SBOOK_WA LIKE SBOOK.
    FIELD-SYMBOLS <SB> STRUCTURE SBOOK
    DEFAULT SBOOK_WA.
    WRITE: <SB>-BOOKID, <SB>-FLDATE.
    Regards
    Anji

  • Third Party Applications? What exactly are they?

    Right,
    I've read alot about the Blue Screen that appears when Upgrading to OSX Leopard. I am intending on upgrading tomorrow when my external hard drive arrives so I can Clone my 10.4.11 onto the external hard drive and upgrade the cloned version first but would like to know if I can check in advance for any of these' Third party App's'? and what exactly are they?
    Regards,

    A third party application is anything not made by Apple. It can also include products that Apple purchased fairly recently (some of those "Pro" apps) that weren't coded to Apple's specfications and haven't been well tested. Apple doesn't and shouldn't test their software with third party applications. It isn't their job to test other people's software. They probably make exceptions for things like Office and Photoshop, but that is a short list.
    Most third party applications will be fine. The ones you have to worry about are those that ask for your password when you install them. They can then install any sort of incompatible software.
    After you clone your hard drive, verify that you can boot from the external drive and all your data is there. If so, don't upgrade the external drive. Boot using the 10.5 DVD and immediately run Disk Utility and re-partition your internal hard drive to wipe it out completely. Then install Leopard. Do not use Migration Assistant. Re-install all your 3rd party applications that are 10.5 compatible. Be very careful about copying over from backup anything in a Library/Preferences folder. You can copy any preference file from a third party application back over - those are safe. Anything from Apple may have been upgraded. Only copy over the Apple files that you absolutely have to, such as your Mail folder and Address book file, for example.
    It sounds like a lot of work but it will only take a couple of hours.

  • What exactly are the updates good for on an ipod

    I ask because mine is windows format, and im having trouble transferring all the metadata off my ipod with senuti to a back up so that i can reformat the ipod to mac and then sync in my senuti backed up library. I was wondering if anyone knows what exactly are the updates that you get. my ipod is 1.2 5thgen.
    If i were to have the latest update would i be able to see album cover art view when the ipod is plugged into itunes? I noticed that i can see that view in library mode but not in ipod mode. (my pod isnt synced)...
    so what are these updates good for?

    hey thanks for your reply.
    I do have it set to manual and i can see the art on the ipod by itself, but even with manual transfer itunes wont let me view the artwork modes unless i am playing off my computers library (which doesn't have the songs on my ipod on it). I called apple earlier today and some tech support guy claimed that itunes does not support this feature. Is this correct? can anyone out there see artwork modes on an unsynced ipod through itunes?

  • What, exactly, are 'encoded assets'? Why does removing them resolve problems? How can they be avoided in the first place?

    What, exactly, are 'encoded assets'? Why does removing them resolve problems? How can they be avoided in the first place?

    As I understand it, encoding fomats your digital video clips and photos (assets) into Standard DVD mp2 format so that it can be burned to a DVD.  If there has been an error in the encoding process, then you remove the old encoded assets and start over.  There are numberous reasons why there can be errors in the encoding process. 

  • What exactly ARE the .pkg files that collect in the 'Receipts' folder?

    Hi there all.
    Those .pkg files that collect in HDD>Library>Receipts. What exactly ARE these packages for? How do they tie in with Disk Utility's 'Repair permissions' option? Why do we need to keep them?
    It's all Unix to me ;0)

    I used to delete .pkg files after I'd installed an application. I thought i was just the electronic equivalent of throwing away the empty box after I'd bought something.
    The "cardboard box" icon encouraged me to think that.
    Then someone said you should never throw away those.pkg files.
    So I stopped.
    But the only thing that has ever happened is that during permissions repair, I get a few lines here and there that say "could not repair permissions".
    I have experienced no other problems of any kind over about the last 2 years. All applications running normally, nothing weird happening.

  • What exactly are unscaledWidth and unscaledHeight in mobile item renderers?

    Hello,
    What exactly are unscaledWidth and unscaledHeight that get passed to the measure() method for a mobile item renderer?
    I am guessing renderers start at  "default" width and height (so unscaled) which get scaled based on DPI. Is that it?
    Thank you.

    measure() doesn't take any parameters so I assume you mean the layoutContents() and/or drawBackground() methods.
    If you look at the code in LabelItemRenderer (and MobileSkin) for updateDisplayList() you'll see that it just delegates the work to the drawBackground() and layoutContents() methods:
        override protected function updateDisplayList(unscaledWidth:Number,
                                                      unscaledHeight:Number):void
            // clear the graphics before calling super.updateDisplayList()
            graphics.clear();
            super.updateDisplayList(unscaledWidth, unscaledHeight);
            drawBackground(unscaledWidth, unscaledHeight);
            layoutContents(unscaledWidth, unscaledHeight);
    This was done to make it a little bit easier for people to subclass LabelItemRenderer/IconItemRenderer by breaking the positioning logic apart from drawing the background visuals.  Check out the documentation for UIComponent.updateDisplayList and look around on Google for more information on how updateDisplayList fits into the Flex component life cycle.

  • What exactly are bezels when referring to the ipad?

    What exactly are bezels when referring to the ipad?

    In what context are you seeing this term? The only use of "bezel" in relation to the iPad I can think of is the frame, aka "bezel" that surrounds the screen.
    Regars.

  • What exactly are the cron scripts doing?

    Hi,
    Hope the subject says it all: I have searched but not found a detailed explanation as what the cron scripts (daily, weekly, monthly) actually do, and if the utilities (Onyx, Cocktail, Xupport, etc) are doing exactly the same.
    Can someone point to a site or explain?
    TIA
    Dan

    Hi Dan,
    (in addition to Barry's reply)
    Yes,
    1) running the Daily, the Weekly and the Monthly tasks manually with an utility, or
    2) running them yourself with the
    sudo periodic daily
    sudo periodic weekly
    sudo periodic monthly
    Terminal commands
    (or this one: sudo periodic daily weekly monthly), or
    3) leaving your computer running 24/7/365 so that they run automatically,
    all three ways do exactly the same thing.
    --> To see what they do exactly, the best way is to open Console, and in the /var/log section, look for "daily.out", "weekly.out" and "monthly.out".
    What exactly are the "cron scripts" doing?
    (Periodic tasks)
    In Console, you'll find a lot of different files that grow with more and more information every minute, even every second for some of them.
    The three Periodic tasks regularly rearrange them and compresses them so that they don't take too much disk space.
    They also rebuild some system database so that the data never gets unusable by the system.
    HTH
    Axl
    201

  • What exactly are the free levels of Adobe services?

    What exactly are the free levels of Adobe services?

    Cloud Plans http://www.adobe.com/products/creativecloud/buying-guide-at-a-glance.html may help

  • What exactly are these parts that they replaced?

    Okay, so I just got my MacBook about 20 minutes ago from a main logic board replacement. Only, it says all these other things that were replaced as well. Can someone tell me WHAT they are?
    SVC, Bezel, M42, PCB, 2.0GHZ DC, SMS/KIONI, Heatsink
    Any ideas? I am clueless. The only thing I could really make out was that the main logic board and the topcase were reaplaced as well.

    (blushes) I would love to for sure, but I don't have the internet on my Mac yet. You see, I've been in the stone ages with my PC, using AOL...dial up! Yes, I know, who really usues dial up anymore? But it's so easy, and I never had any real need to have wireless. Anywho, I cannot seem to configure AOL to work on the MacBook with a dial up, so I am forced to use my PC (which I am on right now)for my internet needs until I start school again in a couple of weeks (have a free ethernet connection in my dorm room).
    Is this something I can download onto my PC, burn to a disc, and THEN transfer it to my MacBook? Or is that totally unheard of and crazy?
    Thanks for the help!!

  • What EXACTLY are the 4 NVIDIA High Definition Audio devices on N570GTX - Win 8.1

    Hi guys,
    one of my rigs runs an N570GTX on Win 8.1 64bit.
    In Device Manager > Sound, Video and Game Controllers, there are 4 "NVIDIA High Definition Audio" listed.
    I use 337.88 drivers (NVIDIA Control Panel version 7.7.760.0).
    What is the purpose of EACH of these 4 devices:
    As a side note, my other rig running an N660GTX on Win 7 64bit only shows 1 "NVIDIA High Definition Audio" in Device Manager > Sound, Video and Game Controllers.

    Okay, by examining the devices (enabling, disabling, reading driver data), I can conclusively state that one of the drivers (in my case residing in Location 1) is exclusively tied to the HDMI port on my GPU –  when I disable it, my HDMI device (I have only one; shame, because I can't isolate the devices better) stops being listed in Windows Sound Control Panel; when I disable all other devices except that one, my audio over HDMI works fine – this leads me to believe that the other ones are not really essential codecs required for HDMI audio, but are instead related to the individual audio outputs.
    In summary, assuming the other two devices (residing, for example, in Location 0 and Location 2) are for audio output on DVI ports (usable via DVI->HDMI adapter/cable), there's still one NVIDIA High Definition Audio device (residing in, say, Location 3), which doesn't seem to be in use in relation to some sort of global codec mechanism (since I can disable it without affecting my HDMI port audio output), that is unaccounted for!
    Any idea what other output can the remaining device be linked to, since GTX570 has no S/PDIF pass-through connector on the board itself (to connect it to the motherboard's S/PDIF output)?
    Could the remaining device be there only as a legacy stub for S/PDIF connector which was present on the pre GeForce 400 Series cards, since they share the same NVIDIA drivers with the post-Tesla series?
    But in that case, why does my GTX660 list only one NVIDIA High Definition Audio device in Win 7 64bit?
    Quote from: Nichrome on 02-July-14, 19:33:05
    Apart from the sound you can get through HDMI (which would be 1 or 2 of these in management), it provides your board with some "HD Sound Drivers" which takes another 1 or 2 of these.
    I have quite few of these too even on my old laptop (with Nvidia card): x4 Nvidia High Definition Audio, x1 Cyberlink WebCam, x1 Realtek HD and x1 Bluetooth sound.
    Your specs read that you have a GTX770 running on Win 7 64bit; do you also have four of the Nvidia High Definition Audio devices? Or just one? Thanks!

  • What exactly are objects?

    Hi, i am new to java and i do not exactly understand the concept of OBJECTS...they are somehow relates to methods and classes. Is there a place where is can know about objects in java? Maybe someone here can help me..

    Think about it this way? What is an object? Is a man, woman, pen, employee, map, napkin? All of those are objects correct?
    So in Object Oriented Programming, like Java, you can create something called a class that describes these.
    An object or class(in most cases), is used to describe just that, an object.
    For example, take a man, he is an object, so how would you descibe a man? Maybe, name, weight, height, hair color, or however much more detailed you want to get. So you create a class that contains all that information in a way that you can reuse it for any man object that you want to create later.
    Does that make more sense?

  • What Exactly are the Benefits of More GPU RAM for PP, AE, PS ?

    What benefit is there to having, say 4gb GPU RAM over 2gb ?
    I have read numerous conflicting, and perhaps misguided, claims regarding when/why one would rather have a graphics card with more than 2gb RAM.
    Does this impact effects render, multiple monitor resolution, CUDA, Mercury Playback Engine performance, other areas, etc. and how?
    Thanks for your response.
    A Ajar

    2GB of video ram is more than enough for the Hardware MPE engine and 1080 media with effects. Essentially the greater the ram space on the video card the greater ram caching available for the Cuda acceleration to buffer data ready for GPU processing. The Application memory management ie caching profiles though effect this based on each codec and resolution ie data per frame. However along with this you have to have enough system ram to create the buffers used to cache the data down to the GPU ram since that data shadows down for GPU processing and then back again for final encoding. This means that not configuring enough system ram will limit the amount of GPU ram used. Hence why you want atleast 16GB of ram for HD and the hardware MPE engine. 3GB+ ram spaces on video cards are for 2K to 4K + frame sizes ie R3D and Raw/CinemaDng. This is because the data per frame multiplies significantly when at 4K resolution. This require far greater ram space which is why you look for the 3GB+ ram space cards for those workflows. The Effect data will also increase because there is far mroe resolution data to alter. This is on top of the drawing out data which is what you see on the screen. That is when the differences for the cards show.
    Eric
    ADK

  • What exactly are Pantone colors?

    Hello:                                                                                     Level: New Newbie  OS: Win 7 64bit
    I came across something today while familiarizing myself with Illustrator and Photoshop and I have tried to Google but I'm not so good with Keywords.
    I would like to know exactly what Pantone colors are and if they are for web use or are they for projects that are intended for printing only.
    Thank you for your time
    Kara

    You are welcome, Kara, apologizing for the slightly woolly way of explaining (not only as substitutes referring to the CMYK values amidst three disturbingly similar references to Pantone spot colours).
    I'll start a new thread though ... hope to see you there
    I am looking forward to it, but since it is midnight in half an hour over here I shall have to attend to other duties just about as soon.

Maybe you are looking for

  • Error in iTouch, but OK in iPhone simulator

    I got the following error: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIWebDocumentView anchorPoint]: unrecognized selector sent to instance 0x839a00' the code runs ok in iphone simulator, but in my iTouch 3G (

  • Using Lookout to write a decimal point to an RTU in the field.

    Is thier a way to send an lookout exp.(ex.1.56) to a known writable register on an RTU out in the field. I am using the modbus object. I plan to send this expression that I have created to a series of regs. in the field and pull the info to a readabl

  • Dinamic Queue

    Hi gurus, The following question has arisen us: In an integration with SAP R/3, it's desired to use XI like middleware. A user can make n activities. In each activity, will be generated one file that will be sent to another system (SS) in order to in

  • What Film-formats are accepted by iTunes ???

    Next Question : what formats does the film section accept ??? Im trying some different tv-shows i have downloaded and not all seem to work ??? Quicktime and MPEG4 seem to work while Matroska Media File and AVI Video dont - is there no standard or is

  • Yet another colour management question

    Hi folks, I've read several of the very detailed colour management posts/threads here already but haven't found the answer(s) I'm looking for. So I'm hoping that some of the experts might be able to spare me some time and input... I am running a Wind