Here you will find more than 50000 job interview questions

Job Questions Search Engine


Sponsored Links

Which tool can be used to find memory leakage and Invalid memory check

Valgrind can be used to find memory leakage. Valgrind is a multipurpose code profiling and memory debugging tool for Linux when on the x86 and, as of version 3, AMD64, architectures.

Below is the example on how to use valgrind:

#include
int main()
{
char *x = malloc(100); /* or, in C++, “char *x = new char[100] */
return 0;
}

% valgrind –tool=memcheck –leak-check=yes example1

This will result in some information about the program showing up, culminating in a list of calls to malloc
that did not have subsequent calls to free:

==2116== 100 bytes in 1 blocks are definitely lost in loss record 1 of 1
==2116== at 0×1B900DD0: malloc (vg_replace_malloc.c:131)
==2116== by 0×804840F: main (in /home/cprogram/example1)

This doesn’t tell us quite as much as we’d like, though — we know that the memory leak was caused
by a call to malloc in main, but we don’t have the line number. The problem is that we didn’t compile
using the -g option of gcc, which adds debugging symbols. So if we recompile with debugging symbols,
we get the following, more useful, output:

==2330== 100 bytes in 1 blocks are definitely lost in loss record 1 of 1
==2330== at 0×1B900DD0: malloc (vg_replace_malloc.c:131)
==2330== by 0×804840F: main (example1.c:5)

What is the difference between User ID and GUID (Group UserID)

August 27, 2010 by bigboss · Comments Off
Filed under: Shell Scripting Interview Questions, Unix Scripting Interview Questions 

User ID and Group ID. They are used for a first-cut security in Unix systems, in that files and programs can be restricted to certain groups, or to certain users.  Groups are kept in the /etc/group file, users and the group they belong to are kept in the /etc/passwd file.

How sticky bit works in Solaris?

Sticky Bit is a permission bit that protects the files with in a Directory. If the directory has sticky bit set, a file can be deleted by the owner of the file, the owner of the directory or root.

This Prevents a user from deleting other users files from public directories

What is difference between solaris single user mode and multi user mode ?

Single User mode: Single user mode is for trouble shooting purpose, in this mode only root user can login to the system.
Multi User Mode: In this mode apart from root user other user can also login to the system and they can access resources and applications of the system.

Single user mode is the maintenance mode where only systems critical files are mounted. Multiuser mode is running the server with full network services including NFS.

  • Categories

    |
  • Tags

    ADO.NET Questions Algorithm Questions ASP.NET Questions auto_ptr Binary tree questions C++ Constructor Interview Questions C++ Questions CISCO Exams Questions Common Interview Questions Core Java Interview Questions Csharp Questions datastructure questions Delphi 6 find command gdb interview questions grep interview questions IBM certification exams questions Infosys Puzzles Java Struts Linked List Problem Linux Command Questions List Manager Interview Questions Markov Algorithm memory leakage mysql Interview Questions Normalization Oracle Application Developer Certification Exam Interview Questions Oracle Questions Perl Questions PHP Questions Pointers Interview Questions PostgreSQL Database Questions pthread interview questions Smart Pointer Solaris Interview Questions SQL SERVER Interview Questions STL STL Map Symbian OS Tricky Interview Questions Unix Interview Questions unix shell Vector Windows OS Questions