QueryCAT Logo
Search 5,000,000+ questions and answers.

Frequently Asked Questions

I get SIGSEGV in malloc, calloc, realloc, or free. Are they buggy?

Unofficial comp.os.linux.development.* FAQ
No, they are probably not buggy. These four functions are some of the most often used code in the entire system. If there were any major bugs, they would have been found and fixed long ago. When one of these functions produce a SIGSEGV in more than 99% of the cases it will be a bug in your code. Imagine one of the following situations: You free some memory twice. In all these cases, you damage the internal data structures used by malloc and friends.

What is the difference between new/delete and malloc/free?

Ans: Malloc/free do not know about constructors and destructors. New and delete create and destroy objects, while malloc and free allocate and deallocate memory. Ans: C++ allows for dynamic initialization of global variables before main() is invoked. It is possible that initialization of global will invoke some function. If this function crashes the crash will occur before main() is entered. See similar questions...

Can I use malloc/free instead of new/delete in C++?

FAQ on C/C++/Unix by Roseanne Zhang, Java Programmer Certifi...
When you use malloc, you must use sizeof(class or struct), and skipped the entire class/struct initialization process. However, many struct/class in C++ is no longer fixed size, such as string. You will make your code venerable for segmentation error. If you use malloc/free, usually, you code will compile, but get runtime error. When you are in OO, you must think in OO. See similar questions...

Can I free() pointers allocated with new? Can I delete pointers allocated with malloc()?

Freestore management, C++ FAQ Lite
It is perfectly legal, moral, and wholesome to use malloc() and delete in the same program, or to use new and free() in the same program. But it is illegal, immoral, and despicable to call free() with a pointer allocated via new, or to call delete on a pointer allocated via malloc(). Beware! I occasionally get e-mail from people telling me that it works OK for them on machine X and compiler Y. See similar questions...

Is it very buggy in the Jungle?

Green Dragon Adventure Travel FAQ - Frequently Asked Questio...
This is seasonal and can vary as much from one week to the next. We have mosquitoes, and numerous bugs that can be irritating. However there are steps you can take to reduce this problem which includes wearing light long pants and shirts and using a bug repellant with Deet. Our Jungle Resort is cleared and so is relatively bug free. See similar questions...

So can I query the malloc package to find out how big an allocated block is?

Infrequently Asked Questions in comp.lang.c
Not exactly; because the objects are dynamically allocated, their size can change at run time, so this will not be reliable. If you restrict your allocation to allocating sizeof(void *) bytes at a time, you will find that you can use sizeof() to get the size of a block, in the obvious way. The standard does not specify an allocation scheme; the famous author the allocation scheme is based on is implementation specified. Proust is a common choice, however. See similar questions...

Can I use my own malloc?

Programming Questions
If you define a function called malloc in your own code, and link with the DLL, the DLL will call your malloc. Needless to say, you will run into serious problems if your malloc is buggy. If you run any programs from the DOS command prompt, rather than from in bash, the DLL will try and expand the wildcards on the command line. This process uses malloc before your main line is started. See similar questions...

Why do I see a SIGSEGV from my ported UNIX application?

MKS Toolkit, D?veloppement UNIX et Windows - FAQs
Just because your code runs on UNIX does not mean that it will run unmodified on Windows. In our experience, your code may really have a latent bug (or non-portable code) which simply does not manifest on UNIX. To debug such situations: Set the "stop always" state for the Access Violation exception in the Debug/Exceptions menu. On a segmentation violation, a pop-up dialog box will let you launch the debugger at the location of the fault. See similar questions...

Why do I get a SIGSEGV but no core dump?

Unofficial comp.os.linux.development.* FAQ
There are many possible reasons, I will try to list them all, but I could easily have forgotten some: The core would have been larger than the current limit. Verify if there is a limit and try to disable it. In bash, sh and similar shells type ulimit -a to see the current limits and type ulimit -S -c unlimited to disable the limit, finally verify that it has been disabled. In tcsh, csh and similar shells use limit and limit coredumpsize unlimited. See similar questions...

Can I hire a wheelchair/buggy?

faq
We have a number of non-motorised wheelchairs available for hire from our Whistlestop Shop for a refundable £10 deposit. If you would like to reserve a wheelchair for your visit please call 01834 891373 between 10am and 5pm. We also provide buggies for hire for a £10 deposit, £7 of which is refundable. See similar questions...

How do I clean my buggy?

buggies/strollers
The fabric is backed with a waterproof coating. Brush off dirt. More intense cleaning can be done by hand, in warm water, using a mild natural soap. Rinse out soap. Do not use detergents or bleach. Air dry. The fabric is fade resistant, but not fade proof; exposure to direct sunlight can fade the fabric. We recommend that dirt is brushed off the frame and wheels regularly. Clean with a non-abrasive household cleaner and soft cloth. See similar questions...

What Buggy do I use?

Untitled
The UAE terrain is hard on buggies. Some spare parts (for purchasing) and tools/workshop will be available for repairs and assembling & disassembling buggies. There are some local shops that can weld stainless but not planning to carry welding equipment into the desert. A commercial workshop is with an hours drive so major repairs can be carried out over night. It is recommend to have your seat at least 10cm above the ground to clear bumps & dune crests plus other undulations. See similar questions...

Can I use realloc() on pointers allocated via new?

Freestore management, C++ FAQ Lite
When realloc() has to copy the allocation, it uses a bitwise copy operation, which will tear many C++ objects to shreds. C++ objects should be allowed to copy themselves. They use their own copy constructor or assignment operator. Besides all that, the heap that new uses may not be the same as the heap that malloc() and realloc() use! See similar questions...

Why does some code carefully cast the values returned by malloc to the pointer type being allocated?

Infrequently Asked Questions in comp.lang.c
In interrupt-riddled code, it may be necessary to cast values to force the CPU to resolve pointer types. [a] See similar questions...

How can I track down these pesky malloc problems?

Tools and Resources
A number of debugging packages exist to help track down malloc problems; one popular one is Conor P. Cahill's ''dbmalloc'', posted to comp.sources.misc in 1992, volume 32. Others are ''leak'', available in volume 27 of the comp.sources.unix archives; JMalloc.c and JMalloc.h in the ''Snippets'' collection; MEMDEBUG from ftp.crpht.lu in pub/sources/memdebug ; and Electric Fence. See also question 18.16. See similar questions...

I have a problem with my buggy how do I get it resolved?

buggies/strollers
Your first step is to contact your original place of purchase. The retailer has a great knowledge of our products and will be able to arrange a repair/replacement part where necessary. If the product fails in the first year of ownership due to a manufacturing fault we will repair it free of charge. If it is not practical to repair it we will replace it. See similar questions...

What skills do I require to build my own buggy?

The EDGE Products - Frequently Asked Questions
If you are going to build the whole buggy yourself to the plans & make most of your own parts you require general engineering skills. That means you need to know how to cut material to specified sizes, drill holes to the drawings & set up & fabricate the chassis & parts. Most parts are available from The Edge Products, so if you get stuck, you can purchase the required part. See similar questions...

Can I jump an Edge buggy?

The EDGE Products - Frequently Asked Questions
Also the higher you jump the more likely you are to inflict serious damage on the buggy & yourself! A buggy with independent rear suspension like the Piranha or Hypersprint can absorb these impacts with greater ease as each wheel can absorb the impact independently. Watch the Crusties movies & you will see their biggest jumps always have a decent down ramp for a landing. See similar questions...

How do I mount the motor in my Buggy?

The EDGE Products - Frequently Asked Questions
First drop the motor into an approximate position, wrap a chain around the two sprockets so you can see if the chain will foul on anything. This will give you an indication as to go up or down or forward & back with the motor for ideal position. Take the chain off & use a straight edge across the motor & rear axle sprocket to line up the sprockets. You need to square the motor to the frame, you may be able to work off the machined face under the motors sprocket cover. See similar questions...

How fast will my buggy go, & how do I work it out?

The EDGE Products - Frequently Asked Questions
In the following we are assuming the motor tops out at 10,000 RPM, this is conservative considering the design of most modern motorcycle engines that are designed to rev very high. That's not allowing for the fact that you can still shift up to 6th gear, & also not allowing for tyre growth which will also increase your speed. If for some reason you could not achieve 10,000 RPM, (and you WILL achieve it) because of wind resistance or its getting scary, lets say you only got to 8,000 RPM. See similar questions...

Explore Other Topics

How much soil volume do trees need?
Can you provide advice on how I should invest the money in my company's 401(k), 403(b) or 457 Plan?
What caused Titanic to sink?
What is SQL*Plus?
Do I have to pay extra for the interim driver license, driver permit, or identification card?
Will you be able to play PS2 games on the PS3?
Can I buy in bulk and not pay individual shipping prices?
Can I apply for employment with Safeway online?
How do I embed the buttons or banners in my web pages?
Do I need a chimney liner for my new boiler?
How do I know if there is a Lego Store opening in my area?
Q:  What is GMO, and what does that mean? Is your soymilk independently tested for GMO?
What do the grades A-B-C-D stand for?
I am behind a firewall, what can I do to be able to listen???
My child fell and broke a tooth. What should I do?
More Questions >>

© Copyright 2007-2012 QueryCAT
About • Webmasters • Contact