LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-02-2014, 12:57 AM   #1
zerop
Member
 
Registered: Jul 2014
Posts: 65

Rep: Reputation: Disabled
Question how to realloc size of array of character (global var) used by create_proc_read_entry


in kernel module,
how to realloc size of array of character (global var) used by create_proc_read_entry

when i use vmalloc to reassign this variable,
it will make linux hang

it seems using another new memory location not allowed

how to base the original memory location to expand the size of array of character?
 
Old 08-02-2014, 06:17 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,138

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
create_proc_read_entry was removed in 3.10 so you must be on an old kernel.
It can return a partial result and variable length, so you should not need to realloc anything.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
dynamic array, how many bytes to realloc? sneakyimp Programming 4 11-07-2011 09:44 PM
next size error in realloc() orion9114 Programming 4 11-07-2011 05:12 PM
[SOLVED] problem with realloc(): invalid next size golden_boy615 Programming 2 07-19-2011 05:24 AM
C realloc resize array? Thesniperofdeath Programming 2 03-06-2011 07:33 PM
in external function: realloc of array within a struct ruh31 Programming 1 01-05-2008 10:02 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration