Sponsored Content
Top Forums Programming Malloc function returning NULL Post 302820749 by shamrock on Thursday 13th of June 2013 11:28:20 AM
Old 06-13-2013
@OP:

I was only interested in the definition of the format_tree structure i.e. what its members are. Also are you compiling the source code for 32 or 64 bit mode and how much physical memory is installed on each of the *nixes...
 

10 More Discussions You Might Find Interesting

1. Programming

malloc function

Hello This is a simple program i carried out in my machine i dont know how it is working #include<alloc.h> #include<stdio.h> mian() { int *p,j; p= (int*)malloc(1); for(j=1;j<=580;j++) { *p=j; ++p; } p=p-580; for(j=1;j<=580;j++) { printf("%d",*p); } (7 Replies)
Discussion started by: rajashekaran
7 Replies

2. Solaris

malloc returning NULL if freemem high & swapmem low

Hi All, In my application malloc is returning NULL even though there is sufficient amount of free memory is available but swap memory is low. Is this possible that, if free memory is high & swap memory is low, malloc will not be able to allocate memory & return NULL ?:) Kindly look into... (5 Replies)
Discussion started by: Ritesh Kumar
5 Replies

3. UNIX for Dummies Questions & Answers

malloc returning NULL if freemem high & swapmem low (MPRAS version 3.03 )

Hi All,:) In my application malloc is returning NULL even though there is sufficient amount of free memory available but the swap memory is low. Is this possible that, if free memory is high & swap memory is low, malloc will not be able to allocate memory & return NULL ? Few details: ... (4 Replies)
Discussion started by: Ritesh Kumar
4 Replies

4. Shell Programming and Scripting

returning from a function

Hi all, I am very new to BASH shell programming. I need to return an integer from a function to the caller function. I did this: but it keeps giving me wrong return: Can someone help me out here, please? Thanks (2 Replies)
Discussion started by: alirezan
2 Replies

5. Programming

getservbyport - Always returning NULL servent

Hi, I am having an issue using getservbyport. Here is a little program to demonstrate the problem (removed the includes): int main(void) { struct servent *service; int memsize = sizeof(struct servent); service = (struct servent *)malloc(memsize); ... (2 Replies)
Discussion started by: goon12
2 Replies

6. Shell Programming and Scripting

Script returning null results

Hi, The following shell script returning null results could you please tell me whats the problem in script, ********************************* #!/bin/ksh . $HOME/conf/systemProperties/EnvSetup.properties a=`date +"%y%m%d"` set -x for i in `cat... (2 Replies)
Discussion started by: shivanete
2 Replies

7. Shell Programming and Scripting

Returning the name of function used

Hi All In my script, I can call on several functions. I have a logging function that is called by any of these functions. What I would like is some way of identifying which function I am using and pass this to the log function as some parameter. Is there some built in command or way of... (3 Replies)
Discussion started by: kingpin2502
3 Replies

8. Programming

Regarding the maximum memory allocated by malloc() function on HP-UX B11.11

In a 'C' program,when I am trying to allocate memory with the help of malloc () function, it is allocating the memory up to a certain limit for e.g. in my case, it is 670 MB (approx). malloc() returns NULL if I allocate more than this amount of memory.When I tried to allocate memory in chunks of... (1 Reply)
Discussion started by: vipinsachan
1 Replies

9. UNIX for Advanced & Expert Users

getservbyname returning NULL

OS : Solaris 10 When I try to get the "echo" service port, getservbyname is returning null. I checked - /etc/services having an entry for echo - echo 7/tcp (But still getservbyname returning null) Any other config required to consider? (1 Reply)
Discussion started by: satish@123
1 Replies

10. Programming

Getpwnam_r returning null with errno 25

I am calling getpwnam_r with all proper argument as below:- rv = getpwnam_r(name, result, buffer, buflen); This program runs fine on sol 8/9/10. But on sol 11 it returns NULL with errno set to 25 (#define ENOTTY 25 /* Inappropriate ioctl for device */) All boxes are... (2 Replies)
Discussion started by: Ranajit
2 Replies
MAKE_SMBCODEPAGE(1)													       MAKE_SMBCODEPAGE(1)

NAME
make_smbcodepage - construct a codepage file for Samba SYNOPSIS
make_smbcodepage c|d codepage inputfile outputfile DESCRIPTION
This tool is part of the Samba suite. make_smbcodepage compiles or de-compiles codepage files for use with the internationalization features of Samba 2.2 OPTIONS
c|d This tells make_smbcodepage if it is compiling (c) a text format code page file to binary, or (d) de-compiling a binary codepage file to text. codepage This is the codepage we are processing (a number, e.g. 850). inputfile This is the input file to process. In the c case this will be a text codepage definition file such as the ones found in the Samba source/codepages directory. In the d case this will be the binary format codepage definition file normally found in the lib/code- pages directory in the Samba install directory path. outputfile This is the output file to produce. SAMBA CODEPAGE FILES
A text Samba codepage definition file is a description that tells Samba how to map from upper to lower case for characters greater than ascii 127 in the specified DOS code page. Note that for certain DOS codepages (437 for example) mapping from lower to upper case may be non-symmetrical. For example, in code page 437 lower case a acute maps to a plain upper case A when going from lower to upper case, but plain upper case A maps to plain lower case a when lower casing a character. A binary Samba codepage definition file is a binary representation of the same information, including a value that specifies what codepage this file is describing. As Samba does not yet use UNICODE (current for Samba version 2.2) you must specify the client code page that your DOS and Windows clients are using if you wish to have case insensitivity done correctly for your particular language. The default codepage Samba uses is 850 (West- ern European). Text codepage definition sample files are provided in the Samba distribution for codepages 437 (USA), 737 (Greek), 850 (Western European) 852 (MS-DOS Latin 2), 861 (Icelandic), 866 (Cyrillic), 932 (Kanji SJIS), 936 (Simplified Chinese), 949 (Hangul) and 950 (Traditional Chinese). Users are encouraged to write text codepage definition files for their own code pages and donate them to samba@samba.org. All codepage files in the Samba source/codepages directory are compiled and installed when a 'make install' command is issued there. The client codepage used by the smbd server is configured using the client code page parameter in the smb.conf file. FILES
codepage_def.<codepage> These are the input (text) codepage files provided in the Samba source/codepages directory. A text codepage definition file consists of multiple lines containing four fields. These fields are: o lower: which is the (hex) lower case character mapped on this line. o upper: which is the (hex) upper case character that the lower case character will map to. o map upper to lower which is a boolean value (put either True or False here) which tells Samba if it is to map the given upper case char- acter to the given lower case character when lower casing a filename. o map lower to upper which is a boolean value (put either True or False here) which tells Samba if it is to map the given lower case char- acter to the given upper case character when upper casing a filename. codepage.<codepage> - These are the output (binary) codepage files produced and placed in the Samba destination lib/codepage directory. INSTALLATION
The location of the server and its support files is a matter for individual system administrators. The following are thus suggestions only. It is recommended that the make_smbcodepage program be installed under the /usr/local/samba hierarchy, in a directory readable by all, writeable only by root. The program itself should be executable by all. The program should NOT be setuid or setgid! VERSION
This man page is correct for version 2.2 of the Samba suite. SEE ALSO
smbd(8) smb.conf(5) AUTHOR
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed. The original Samba man pages were written by Karl Auer. The man page sources were converted to YODL format (another excellent piece of Open Source software, available at ftp://ftp.icce.rug.nl/pub/unix/ <URL:ftp://ftp.icce.rug.nl/pub/unix/>) and updated for the Samba 2.0 release by Jeremy Allison. The conversion to DocBook for Samba 2.2 was done by Gerald Carter 19 November 2002 MAKE_SMBCODEPAGE(1)
All times are GMT -4. The time now is 06:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy